Types of errors
From HalyardWiki
There are several types of errors in Halyard
| Scheme | C++ | RUNTIME | COMMAND_LINE | Unit tests | AUTHORING | Purpose |
|---|---|---|---|---|---|---|
| error | (C++ exception) | Throws | Throws | Throws | Throws | Ordinary exception. |
| fatal-error | FatalError | Crashes | Crashes | Crashes | Crashes | Fatal error. Engine does not know how to continue. |
| report-error | Error | Crashes | Crashes | (Depends on mode) | Displays dialog | Report an error (and continue, if in AUTHORING mode). |
| warning | Warning | (does nothing) | Prints to console | Test failure | Displays dialog | Warn about suspicious code. |
Contents |
[edit] Notes about when to use types of errors
[edit] Runtime Mode
The user can't deal with errors in this mode. If there are bugs in the scripts, it's game over. All errors are fatal, and all warnings are completely ignored.
[edit] Command-line Mode
There may not be anybody available to click on a dialog box, so we either crash or print things to the console.
[edit] Unit Tests
The only thing we special-case here is warnings. We do this because libraries should not get warnings while running unit tests.
[edit] Authoring Mode
We have a programmer available (or one nearby), so report errors and let people continue development.

