v5:userguide:error_handling
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
userguide:error_handling [2015/11/30 02:06] – mnewnham | v5:userguide:error_handling [2016/02/02 03:30] – mnewnham | ||
---|---|---|---|
Line 5: | Line 5: | ||
===== PHP set_error_handler ===== | ===== PHP set_error_handler ===== | ||
- | Once the PHP set_error_handler is used to override the default error handling, then the ' | + | Once the PHP set_error_handler is used to override the default error handling, then the ' |
- | --------------------------------------- | + | |
+ | --------------------------------------------------- | ||
<WRAP right box round> | <WRAP right box round> | ||
== See Also == | == See Also == | ||
- | [[reference: | + | [[v5:reference:connection: |
</ | </ | ||
===== adodb-errorhandler.inc.php ===== | ===== adodb-errorhandler.inc.php ===== | ||
Line 41: | Line 43: | ||
</ | </ | ||
- | + | ||
===== Override Error Trap/Resume ===== | ===== Override Error Trap/Resume ===== | ||
Line 73: | Line 75: | ||
$db-> | $db-> | ||
+ | </ | ||
+ | |||
+ | ===== Using A Class Method ===== | ||
+ | <code php> | ||
+ | class c | ||
+ | { | ||
+ | function e() | ||
+ | { | ||
+ | print "ERROR TRAP"; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | $c = new c; | ||
+ | |||
+ | $db-> | ||
</ | </ | ||
Line 150: | Line 167: | ||
The following message will be logged in the error.log file: | The following message will be logged in the error.log file: | ||
- | 2001-10-28 14:20:38 mysql error: [1146: Table ' | + | 2001-10-28 14:20:38 mysql error: [1146: Table ' |
+ | | ||
===== PEAR_ERROR ===== | ===== PEAR_ERROR ===== | ||
Line 190: | Line 208: | ||
===== MetaError and MetaErrMsg ===== | ===== MetaError and MetaErrMsg ===== | ||
- | If you need error messages that work across multiple databases, then use [[reference: | + | If you need error messages that work across multiple databases, then use [[v5:reference:connection: |
===== Error Messages ===== | ===== Error Messages ===== | ||
- | Error messages are outputted using the static method ADOConnnection:: | + | Error messages are outputted using the static method |
+ | |||
+ | | ||
+ | |||
+ | By default, it sends the messages to the standard output. You can override this to perform error logging. |
v5/userguide/error_handling.txt · Last modified: 2018/06/27 16:18 by dregad