Skip to content
Snippets Groups Projects
Commit cebe19d5 authored by Graham Cole's avatar Graham Cole
Browse files

give some clues about how error handling works now

parent e0b1e84d
No related branches found
No related tags found
No related merge requests found
......@@ -35,3 +35,11 @@ $session->data array for storing persistant data
any values stored in data[] will be persistant between pages
for as long as the users session cookie stays active.
For error handling, your component should use the trigger_error() function:
trigger_error("Informational message", E_USER_INFO); // To inform the user that something happened, e.g. the session expired
trigger_error("Warning message", E_USER_WARNING); // Warn the user of an expected error, e.g. incorrect password
trigger_error("Error message", E_USER_ERROR); // Reserved for unexpected conditions, e.g. unable to connect to database
You may also use the message_flash("status message") function for helpful messages, e.g. form submitted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment