How to handle exceptions - dialogos-project/dialogos GitHub Wiki

Most users will run DialogOS by double-clicking on the application. It is therefore not useful to them if you print error messages to the console. Here are some principles for handling exceptions in DialogOS code and plugins.

  • Report your exceptions if your code cannot handle them. Having DialogOS silently fail will be confusing for the user.
  • Use the method com.clt.gui.OptionPane#error to display your exception. This will display a window which summarizes the exception and offers the user to show details, including a stacktrace. They can then copy & paste the detailed error into a bug report on Github, in a way that allows you to see what went wrong.