September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool trigger_error(string error_message, [int error_type])
Triggers an error.
Returns:
TRUE if the error could be generated; FALSE if the error_type argument is not a defined E_USER_* error type
Description:
trigger_error() is used to generate errors of the E_USER_ERROR, E_USER_WARNING, and E_USER_NOTICE type. Errors of this level can be caught by the built-in PHP error handler or can be handled by a custom error handler. See set_error_handler() for more details on custom error handlers.
Availability:
UNIX/Linux, Windows
Version:
4.0.1+
See also:
To use a custom error handler for errors:
set_error_handler()
Examples:
# Call trigger_error()
trigger_error ('Error message', E_USER_WARNING);
|
Read now
Unlock full access