SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 418 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

We can test the return value of a method to see if it is an error using the
JError::isError() method. As an example, the JController execute() method
returns an error if no method is mapped to the task we try to execute:
$result = $SomeCOntroller->execute('someTask');
if(JError::isError($result))
{
// handle invalid task
}
Customizing Error Handling
The handling of errors is not set in stone. We can modify the way each of the levels
is handled and we can add new levels. We can choose any of the following modes
(maximum of one mode per error level):
Mode Description
Ignore Error is ignored
Echo Prints the JException message to screen
Verbose Prints the JException message and back-trace information to screen
Die Terminates the application and prints the JException message to screen
Message Adds a message to the application queue
Log Adds a log entry to the application error log
Trigger Triggers a PHP error
Callback Calls a static method in another class
To modify the error handling of an existing error level we can use the JError::
setErrorHandling() method.


Pages:
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430
druga wojna światowa Free English grammar and study guid hotel jelenia góra Russian bride counter strike 1.6