Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 31-03-2009
Member
 
Join Date: May 2008
Posts: 37
PHP trigger_error

Description

trigger_error ? Generates a user-level error/warning/notice message

Quote:
bool trigger_error ( string $error_msg [, int $error_type= E_USER_NOTICE ] )
Used to trigger a user error condition, it can be used by in conjunction with the built-in error handler, or with a user defined function that has been set as the new error handler (set_error_handler()).

This function is useful when you need to generate a particular response to an exception at runtime.


Syntax

PHP Code:
trigger_error(error_message,error_types
Reply With Quote
  #2  
Old 31-03-2009
Member
 
Join Date: May 2008
Posts: 37
Re: PHP trigger_error

Parameters

error_msg

The designated error message for this error. It's limited to 1024 characters in length. Any additional characters beyond 1024 will be truncated.

error_type

The designated error type for this error. It only works with the E_USER family of constants, and will default to E_USER_NOTICE.

Return Values

This function returns FALSE if wrong error_type is specified, TRUE otherwise.

error_types
E_USER_ERROR - Fatal user-generated run-time error. Errors that can not be recovered from. Execution of the script is halted.

E_USER_WARNING - Non-fatal user-generated run-time warning. Execution of the script is not halted.

E_USER_NOTICE - Default. User-generated run-time notice. The script found something that might be an error, but could also happen when running a script normally.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search



All times are GMT +5.5. The time now is 07:10 AM.