v5:userguide:error_handling
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| v5:userguide:error_handling [2016/02/01 23:56] – mnewnham | v5:userguide:error_handling [2018/06/27 16:18] (current) – function names starting with lowercase (#430) dregad | ||
|---|---|---|---|
| Line 44: | Line 44: | ||
| </ | </ | ||
| - | -------------------------------------------------- | + | |
| - | <WRAP right box info 300px> | + | |
| - | Currently, the raiseErrorFn must be a function, not a class method. | + | |
| - | </ | + | |
| ===== Override Error Trap/Resume ===== | ===== Override Error Trap/Resume ===== | ||
| In certain circumstances, | In certain circumstances, | ||
| Line 70: | Line 67: | ||
| set_error_handler(' | set_error_handler(' | ||
| - | $db->Execute('DROP INDEX index_that_might_not_exist' | + | $db->execute('DROP INDEX index_that_might_not_exist' |
| /* | /* | ||
| Line 78: | Line 75: | ||
| $db-> | $db-> | ||
| + | </ | ||
| + | |||
| + | ===== Using A Class Method ===== | ||
| + | <code php> | ||
| + | class c | ||
| + | { | ||
| + | function e() | ||
| + | { | ||
| + | print "ERROR TRAP"; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | $c = new c; | ||
| + | |||
| + | $db-> | ||
| </ | </ | ||
| Line 112: | Line 124: | ||
| try | try | ||
| { | { | ||
| - | $db = NewADOConnection(" | + | $db = newADOConnection(" |
| } | } | ||
| Line 143: | Line 155: | ||
| - | $c = NewADOConnection(' | + | $c = newADOConnection(' |
| - | $c->PConnect(' | + | $c->pConnect(' |
| - | $rs=$c->Execute(' | + | $rs=$c->execute(' |
| if ($rs) | if ($rs) | ||
| Line 168: | Line 180: | ||
| include(' | include(' | ||
| - | $c = NewADOConnection(' | + | $c = newADOConnection(' |
| - | $c->PConnect(' | + | $c->pConnect(' |
| - | $rs=$c->Execute(' | + | $rs=$c->execute(' |
| if ($rs) | if ($rs) | ||
v5/userguide/error_handling.1454367371.txt.gz · Last modified: (external edit)
