-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Exceptions thrown from classes executed by the java api are not propagated #688
Comments
I've located the cause: If adding both the message and catched exception to the throw statement, the stacktrace is augmented with:
I will prepare a PR to fix it. @authorjapps can you please assign this to me? |
yep, that's right. Sounds amazing. Please go ahead 🚀 Also, added you now as collaborator. Click here to accept.
Also, can you add relevant logs as ERROR level for the DB executor, to surface important exception messages etc to the end user? This will be very helpful to Devs and SDETs to avoid rabbit holes when any problem arises. (Ignore me if you've already thought of doing it anyways, as part of this ticket :) ) |
@authorjapps Great!! Thank you.
I did, but because of this issue, I logged the messages and exceptions, which generates the needed stacktrace to locate failures (e.g. sql syntax, or invalid CSV cells). After fixing this issue, I think that only logging the error messages will be enough. I will check it. |
When a java api operation throws an exception, the exception message and stacktrace are not shown as part of the scenario stacktrace, making it difficult to debug.
To reproduce:
org.jsmart.zerocode.core.AddService
and replacereturn 30
in the 'anInteger' method bythrow new RuntimeException("INTENTIONAL EXCEPTION")
unit_test_files/java_apis/02_test_json_java_service_method_no_param.json
and remove"loop": 5,
org.jsmart.zerocode.core.javamethod
Expected: Some information about the RuntimeException
INTENTIONAL EXCEPTION
, and its stacktrace should be shownActual: It is ommited. This is the stacktrace:
The text was updated successfully, but these errors were encountered: