rfc:catchable-call-to-member-of-non-object

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:catchable-call-to-member-of-non-object [2014/04/28 01:00] – Incorporate example by Thomas thekidrfc:catchable-call-to-member-of-non-object [2014/04/28 01:02] thekid
Line 66: Line 66:
  
 ==== Example: Without exceptions ==== ==== Example: Without exceptions ====
-This could be a way for people preferring not to use exceptions:+This could be a way for people preferring not to use exceptions and instead to exit the script directly, but get a clean stacktrace instead of just the fatal error message:
  
 <PHP> <PHP>
Line 72: Line 72:
   echo "*** Error #$code: $message\n";   echo "*** Error #$code: $message\n";
   debug_print_backtrace();   debug_print_backtrace();
 +  exit(0xFF);
 }, E_RECOVERABLE_ERROR); }, E_RECOVERABLE_ERROR);
    
rfc/catchable-call-to-member-of-non-object.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1