Exactly how you choose to classify your errors is up to you.
Classification of errors tends to be relatively intuitive. An error that is not fatal, but
should not have occurred, is a warning. An error that is not fatal, and is more or less
expected to occur at some point is a notice.
The error code we used in the last example, ERROR_CODE, may seem a little odd. We
can specify any error code we want; the exact intricacies of how Joomla! core error
codes are going to be classified has not been fully decided. In the short-term Joomla!
core errors are using scheme error codes and SOME_ERROR_CODE.
Return Values
Using the three methods we also get a return value, a JException object. The
JException class contains all sorts of useful information about an error; including
the error level, error code, and error message. When we raise an E_ERROR level error
the object will also contain back-trace information, such as the file and line the error
occurred on.
Error Handling and Security
[ 314 ]
There are many methods in other classes that, if an error occurs, will return the
result.
Pages:
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429