Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove BootstrapException in BootstrapConnector.connect #15

Closed
kjordan2001 opened this issue Dec 13, 2016 · 6 comments
Closed

Remove BootstrapException in BootstrapConnector.connect #15

kjordan2001 opened this issue Dec 13, 2016 · 6 comments

Comments

@kjordan2001
Copy link

Can this be changed to throw the original exception? There are a variety of things that can happen in the original exception that are hidden by wrapping it in a BootstrapException since the original isn't added to the stacktrace, instead it's in a separate getter that you'd have to get by going through the exception stack since it's wrapped again before we get it into an OpenOfficeException. I ask this because it was difficult for me to tell what was going on with a problem I had using yarg in an updated EC2 Beanstalk environment where a permission change in the tomcat home directory prevented it from making a .openoffice directory and it was immediately clear when I did my own version of BootstrapConnector that returned the original error.

@tinhol
Copy link
Contributor

tinhol commented Dec 14, 2016

Hello.

Do you mean the following part of code?
if (i == 10) { throw new BootstrapException(ex.toString()); }

@kjordan2001
Copy link
Author

kjordan2001 commented Dec 14, 2016

No, more like in pull request #16 that I just added.

@tinhol
Copy link
Contributor

tinhol commented Dec 15, 2016

Well, I'm not sure it's a good idea, because throws Throwable just does not mean anything certain, and does not help client to handle it at all.
Wouldn't it be sufficient if you get the original exception wrapped by BootstrapException (new BootstrapException(e)) instead of creating BootstrapException with source exception's text (new BootstrapException(ex.toString()))?

@kjordan2001
Copy link
Author

That'd only be slightly better. Unfortunately that doesn't act like most other Exceptions do when you pass in another Exception as the constructor parameter. That only allows you to get it from getTargetException. It seems like it'd be better to have another exception type rather than using one from the OpenOffice API.

@tinhol
Copy link
Contributor

tinhol commented Aug 25, 2017

Hello.

We will remove the BootstrapException from BootstrapConnector implementations in future releases.

tinhol added a commit that referenced this issue Jan 18, 2018
Remove BootstrapException in BootstrapConnector.connect
tinhol added a commit that referenced this issue Jan 18, 2018
Remove BootstrapException in BootstrapConnector.connect
@tinhol
Copy link
Contributor

tinhol commented Jan 18, 2018

Hello.

The issue is resolved in master branch.

@tinhol tinhol closed this as completed Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants