Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception Driven Programming for PHP?

I saw Jeff Atwood's post on his blog about Exception Driven Programming and I was curious if there is anything like ELMAH for PHP?

like image 345
GeoffreyF67 Avatar asked Apr 17 '09 14:04

GeoffreyF67


People also ask

How can I create exception in PHP?

Throwing a generic PHP exception is almost as simple as it sounds. All it takes is to instantiate an exception object—with the first parameter of the Exception constructor being the error message—and then, "throw" it.

What are exceptions in PHP?

An exception is an object that describes an error or unexpected behaviour of a PHP script. Exceptions are thrown by many PHP functions and classes. User defined functions and classes can also throw exceptions. Exceptions are a good way to stop a function when it comes across data that it cannot use.

Does PHP exception?

Table of Contents ¶ PHP has an exception model similar to that of other programming languages. An exception can be throw n, and caught (" catch ed") within PHP. Code may be surrounded in a try block, to facilitate the catching of potential exceptions.

How many types of exception are there in PHP?

PHP Errors: 4 Different Types (Warning, Parse, Fatal, and Notice Error)


1 Answers

Zend Server is providing monitoring of PHP applications. The things it can monitor includes:

  • application response time
  • failed user requests
  • application accesibility
  • generated errors

This is probably the closest you can get to your needs.

like image 85
Peter Smit Avatar answered Nov 13 '22 07:11

Peter Smit