Let’s say there are three consecutive function calls in one try block and all of them throw the same type of exception. How can i figure out which function call threw the caught exception when handling it?
Let’s say there are three consecutive function calls in one try block and all
Share
You can put a try-catch block around every single method call.
Or you take a look at the exception stack trace. Their is described which line of code throwed the exception.
EDIT:
Throwable
StackTraceElement