I want to show exception stacktrace as soon as an exception is caught in the catch block. I am referring to the doc for ControlFX here. Do I just need to copy a part of code and paste it inside the catch block to get the dialog open? Please let me know.
try{
}
catch (SQL Exception ex){
public Action showException(Throwable exception) {
Dialog dlg = buildDialog(Type.ERROR);
dlg.setContent(exception.getMessage());
dlg.setExpandableContent(buildExceptionDetails(exception));
return dlg.show();
}
}
Doing the above generates lot of errors and I am sure something is wrong.
Changes Done After Moving the Code from Catch into Try block are shown in the Image :
The error shown in the line #143 above, is as follows despite having imported
import org.controlsfx.control.action.Action;
import org.controlsfx.dialog.Dialogs;