Skip to content

Exception handler denies following its advice #9

@AmityWilder

Description

@AmityWilder

The DefaultExceptionHandler prints a message advising the user to "Try to save circuit(s)" before immediately closing the program. By exiting automatically, the user has no opportunity to save the circuit(s), meaning that either
a) the suggestion is telling the user to do something they shouldn't or
b) the error is preventing the user from doing something they should

Either the advice should be removed from the error so that users aren't given false hope, or the error should not immediately close the application, giving them an opportunity to follow the advice.

// otherwise show message and quit
else {
	saveTrace(th);
	String msg = "<html>" + 
		"UNEXPECTED INTERNAL ERROR! Try to save circuit(s)." + 
		"<p>" + 
		"JLS will create a file called JLSerror in the current folder/directory." +
		"<br>Please email it to bsiever+jls@gmail.com  to report the error so it can be fixed." +
		"<br><br>Try restarting JLS using checkpoints of open circuits" +
		"<br>(i.e., <i>file</i>.jls~, where <i>file</i> is the name of the open circuit)" +
		"</html>";
	JOptionPane.showMessageDialog(null, msg, "Error", JOptionPane.ERROR_MESSAGE);
	System.exit(1);
}

DefaultExceptionHandler.java lines 93-106

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions