In the application two types of errors are distinguished:
Fatal: Errors, which are so critical, that it's not possible to proceed with the current action (e.g. the missing of a controller).
Non-fatal: Errors, which merely demand a notification to the user (e.g. invalid input)
These errors can be produced in the following ways:
- Fatal: The use of Message::error calls a global error handling routine:
onError($message, $file='', $line='')
- Non-fatal: adding a message to the field _errorMsg of the Controller class makes this message - together with all accumulated messages before and those to follow - available in the next view's $errorMsg variable. In order to delete old messages the field _data['errorMsg'] of the Controller class must be emptied.
Many classes define a method getErrorMsg, which provides more detailed information on the cause of an error.