Quick search:


What is an error

in phpPeantus there are five kinds of errors

A user object edit error occurs when the user entered values into an object edit form that can not be converted or are invalid. The edit page will react whith edit feedback in its InformationPart.

A database error may occur when a query is run. Afterwards the QueryHandler will hold an error message in its error field. Some of its runquery methods will also trigger an E_USER_ERROR, others will not.

E_USER_ERROR and an E_USER_WARNING are triggered through the trigger_error function of php. This happens in several places in the framework as well as in application code. These errors are logged by the PntErrorHandler defined by the Site object. For E_USER_ERRORs it throws a PntErrorException that can be caught and handled by the application and handled. However, during database transactions actions do expect to get an exception if the transaction needs to be rolled back.For the rest they are handled in the same way as php handles E_ERROR and E_WARNING, except that the user in a production environment will get a less technical error message.

E_ERROR and E_WARINING are generated by php. E_WARNING is logged by PntErrorHandler defined by the Site object. The code that caused the warning continues. E_ERROR stops processing and shows an ugly erorr message to the end user. It is not logged. :-(


Finally there are framework functions that throw exceptions, usualyy instances of PntError. These can be caught by the applcication and handled. However, during database transactions actions do expect to get an exception if the transaction needs to be rolled back.