There are 3 different modes for the exception reporting: (In the code, these
are called "type")
MAIN_LOAD_METHOD
The behaviour of this mode depends on whether the window is in ui_mode or not.
If in ui_mode, the window is closed, and the report is written to the console.
If not in ui mode, the report is displayed in a dialog. This dialog only has
one button - "Close", which closes both this dialog, and the window.
This mode should be used for initial window loading methods, where if the method
fail, then the dialog would be useless, and hence gets closed every time.
SUB_LOAD_METHOD
The behaviour of this mode is to show the report in a dialog, with just a close
button. When the close button is clicked, the report dialog is closed, but not
the window.
The mode should be used for methods where you are executing an action, or
loading data from user input provided in the gui, e.g. when you open a branch,
and the location is from a text edit. In these cases, you need to tell the user
that there was an error, but allow the user to continue working.
ITEM_OR_EVENT_METHOD
The behaviour of this mode is to show the report in a dialog, with just a close
and a ignore button. When the close button is clicked, the report dialog and the
window are closed. If the ignore button is pressed, just the report dialog is
closed.
If no mode it specified by the method below, then the global exception handler
uses this as the default, and hence covers alot of unexpected errors. It gives
the user the option to ignore a minor error, and continue working.