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 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 return instances of PntError. The names of these functions should start with an underscore. These errors are used by the framework internally to signal errors back to the entry point called by the application code so that the line number in the E_USER_.. message makes sense to the application developer without him having to understand the internal workings of the framework. Application code is allowed to call these underscored functions, but it will have to check for the errors that may be returned. See how to handle PntError instances returned by a framework function.

User Contributed Notes

None yet
Submit a Note
name: (shown) e-mail: (not shown)

(flat text only)