G
I have the following code in a subroutine of a class which is intended
to give the user (me) some information as to the nature of the error.
In addition I want to include in the MessageDialog the name of the
method that invoked the error. How do I get hold of the method name
when running?
See below especially ??????.getMethodName. Am I close?
try {
} catch (ParserConfigurationException pce) {
JOptionPane.showMessageDialog(
null,
"explicit error message",
??????.getMethodName() + " ParserConfigurationException - Error!",
JOptionPane.ERROR_MESSAGE);
}
to give the user (me) some information as to the nature of the error.
In addition I want to include in the MessageDialog the name of the
method that invoked the error. How do I get hold of the method name
when running?
See below especially ??????.getMethodName. Am I close?
try {
} catch (ParserConfigurationException pce) {
JOptionPane.showMessageDialog(
null,
"explicit error message",
??????.getMethodName() + " ParserConfigurationException - Error!",
JOptionPane.ERROR_MESSAGE);
}