Exceptions and Signals

Exceptions and Signals are unexpected conditions that may occur as your application runs – either because your code or an API call explicitly raises an Exception using using the raise or throw keywords, or because it triggers an error condition (such as a null object reference, a missing file or a similar problem).

Exceptions as a language feature are discussed in more depth here.

By default, the debugger will pause execution of your project when an exception occurs, and show you details about the exception and the code location that the exception occurred at. This gives you a chance to inspect the state of your project and determine the cause of the exception.

If an exception is non-fatal, you can resume execution of your project.

Ignored Exceptions

While not common and a discouraged practice, some exceptions are expected and "normal" to occur during the execution of your project, or are known to be handled at a higher level (for example, an exception might occur when a network connection in your app closes, but that exception would he handled appropriately by the networking library).

Individual exceptions can be ignored, so that they no longer break into the debugger when they happen. By default this list includes a small number of common system exception types (especially on Java/Android), but you can add or remove from this list as you please, using the "Manage Exceptions" Sheet available from the "Debug" menu (⇧⌘E or Shift+Alt+E).

The sheet shows you a list of known exceptions, with checkmarks next to the exceptions that are set to be ignored.

You can check or uncheck any of the exceptions, as you like, and you can also add additional (not yet listed) exceptions by pressing the "Add" button, so simply Pressing ⌘V/Ctrl+V to paste an exception type name you have on the clipboard.

You can also "Uncheck All" to stop ignoring any Exceptions, or "Reset to Default" to restore the original list of ignored Exceptions provided by Fire/Water.

The list of ignored exceptions is maintained per platform, and persisted system-wide across all debug sessions, and across restarts of Fire or Water.

 

 

Disabling Exceptions

You can temporarily disable stopping on any exception by toggling the "Stop on Exceptions" (or "Stop on Exceptions when Testing") option in the "Debug" menu.

Stoping on Exceptions can be disabled separately, for regular debug sessions or for Testing sessions; in Testing sessions, EUNit Assert Exceptions will be ignored by default (as they are "expected", and will be collected as test results), instead. This is covered in more detail in the Testing with EUnit topic.

See Also