[TYPO3-hci] [TYPO3] Mysql error...

Daniel Bruessler info at -remove-patchworking.de
Fri Nov 24 09:19:36 CET 2006


hello,

a database-table for this is the best. An own PHP4-error-handler
(defined by the set_error_handler-function) does "know" the name of the
script, the line and the error-code.

As error-code in PHP4 the constants E_USER_ERROR, E_USER_WARNING and
E_USER_NOTICE are usable. "throwing" an error is possible by the
function trigger_error().

Example:
trigger_error("Cannot divide by zero", E_USER_ERROR);

To have a good error-system what you are imaging this is not enough.
Because you don't know WHAT does throw this error-message.

=> So this would be possible to use by an own error-handler:
trigger_error("extension_name|error_key|Missing tx_specialextension -
attribute in table tt_content", E_USER_ERROR);

In the database there can be a message "Missing tx_specialextension -
attribute in table tt_content. Install missing extension specialextension."

To make this is just a little effort!

Cheers!
Daniel Brüßler


>> no i don't think so.. First you only have to specify a list of actions
>> and enumerate them somehow. This is an action database then.. As soon as
>> you have this, the ext writers just can say: If error X happens within
>> my extension, i would do actions number 1, 2 and maybe 356..
>>
>> The same can be integrated into the core..
>> Andreas



More information about the TYPO3-team-hci mailing list