Possible Duplicate:
In PHP5, should I use Exceptions or trigger_error/set_error_handler?
In PHP 5+, what is better to use?
set_error_handler
, because it can also trap errors which are not exceptions;set_exception_handler
, because it's a new feature and it maybe came to replaceset_error_handler
; or- both, because one does not supersedes the other, and both are useful?