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

Getting exception text in case of error #98

Closed
lexika979 opened this issue Apr 17, 2024 · 5 comments
Closed

Getting exception text in case of error #98

lexika979 opened this issue Apr 17, 2024 · 5 comments

Comments

@lexika979
Copy link

Would it be possible to get the actual text + stacktrace of the exception if one is thrown during a call? That would be super helpful for diagnostics in a production environment where access to the console isnt always possible without jumping through hoops.

Regards

@astonbitecode
Copy link
Owner

This is indeed very helpful, thanks for the proposal!

I implemented filling up the Java errors with the actual throwable info.

Please have a look and see if this works for you too.

@lexika979
Copy link
Author

Will do next week when I'm back in office! Thank you for the quick response and help.

@lexika979
Copy link
Author

Seems to work just fine! Just a little improvement that could be made:
grafik
Currently, it throws the entire stack of exceptions back, and i think it would be alot more readable if we only got the first thrown exception in the trace.

So instead of the entire block, only the "java.io.IOException: The given path is not a readable file: ..."

@astonbitecode
Copy link
Owner

I guess you mean to remove the parts of the stacktrace that are generated by the j4rs internals, leaving the rest of the stacktrace intact... This seems reasonable.

@lexika979
Copy link
Author

Works like a charm! Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants