Error & exception handler for PHP