My first question is who actually prints the prints the stack trace ? Is it the JVM or some other entity? What happens behind the scene when stack trace is printed ? I am looking specifically for an answer that tells me the role of Uncaught exception handlers in printing the stacktrace if there is an application provided UncaughtExceptionhandler.
1. When an exception occurs it is thrown to the JVM.
2. JVM then prints the StackTrace.
3. StackTrace includes the Method name, Class name, File name, and the Line number.
4. fillInStackTrace() method is called to re-initialize the stack trace data in the newly created throwable. Will be helpful in masking the info about the exception when tries to access the API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With