How can I print to the console the name of the method in which the exception was thrown?
The entire call stack is printed using printStackTrace. And how to display only the name of the method in which the exception was thrown to the console?Java Norah McGrath, Aug 25, 2019
exception.getStackTrace ()  .getMethodName ()Anonymous
To place the code, please use CodePen or similar tool. Thanks you!