Advertisement
fruffl

ExceptionHandler

Oct 9th, 2012
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.96 KB | None | 0 0
  1. <?
  2.     class e extends \ILLI\Core\Exception\Exception
  3.     {
  4.         const CODE_MyError  = 40005;
  5.         const MyError       = 'foobar, {{{placeholder}}}';
  6.     }
  7.    
  8.     try
  9.     {
  10.         throw new e(e::CODE_MyError, ['placeholder' => 'Hello World!']);
  11.     }
  12.     catch(e $e)
  13.     {
  14.         var_dump($e);
  15.     }
  16.  
  17. ?>
  18.  
  19. object(localhost\illiFW\dev\e)#16 (12) {
  20.   ["message":protected]=>
  21.   string(20) "foobar, Hello World!"
  22.   ["string":"Exception":private]=>
  23.   string(0) ""
  24.   ["code":protected]=>
  25.   int(40005)
  26.   ["file":protected]=>
  27.   string(9) "index.php"
  28.   ["line":protected]=>
  29.   int(52)
  30.   ["trace":"Exception":private]=>
  31.   array(0) {
  32.   }
  33.   ["previous":"Exception":private]=>
  34.   NULL
  35.   ["__tObject_Hash":"ILLI\Core\Exception\Exception":private]=>
  36.   NULL
  37.   ["__tField":protected]=>
  38.   array(6) {
  39.     ["previous"]=>
  40.     array(1) {
  41.       ["contains"]=>
  42.       &NULL
  43.     }
  44.     ["renderer"]=>
  45.     array(1) {
  46.       ["contains"]=>
  47.       &object(ILLI\Core\Exception\ExceptionMessage)#37 (16) {
  48.         ["__tObject_Hash":"ILLI\Core\Object":private]=>
  49.         string(32) "000000001a03036a000000003fdaa7bc"
  50.         ["__tField":protected]=>
  51.         array(0) {
  52.         }
  53.         ["__tField_LockRegistration":"ILLI\Core\Object":private]=>
  54.         bool(false)
  55.         ["__tField_LockAllFields":"ILLI\Core\Object":private]=>
  56.         bool(false)
  57.         ["__tField_Hash":"ILLI\Core\Object":private]=>
  58.         NULL
  59.         ["__tMethod":"ILLI\Core\Object":private]=>
  60.         array(0) {
  61.         }
  62.         ["__tMethod_Hash":"ILLI\Core\Object":private]=>
  63.         NULL
  64.         ["__tAdapter_tracesEnabled":"ILLI\Core\Object":private]=>
  65.         bool(false)
  66.         ["__tAdapter_traces":"ILLI\Core\Object":private]=>
  67.         array(0) {
  68.         }
  69.         ["__tAdapter_hook":protected]=>
  70.         array(0) {
  71.         }
  72.         ["__tFilter_tracesEnabled":"ILLI\Core\Object":private]=>
  73.         bool(false)
  74.         ["__tFilter_traces":"ILLI\Core\Object":private]=>
  75.         array(0) {
  76.         }
  77.         ["__tFilter_hook":protected]=>
  78.         array(0) {
  79.         }
  80.         ["__tObserver_tracesEnabled":"ILLI\Core\Object":private]=>
  81.         bool(false)
  82.         ["__tObserver_traces":"ILLI\Core\Object":private]=>
  83.         array(0) {
  84.         }
  85.         ["__tObserver_hook":protected]=>
  86.         array(0) {
  87.         }
  88.       }
  89.     }
  90.     ["arguments"]=>
  91.     array(1) {
  92.       ["contains"]=>
  93.       &array(1) {
  94.         ["placeholder"]=>
  95.         string(12) "Hello World!"
  96.       }
  97.     }
  98.     ["unparsed"]=>
  99.     array(1) {
  100.       ["contains"]=>
  101.       &string(25) "foobar, {{{placeholder}}}"
  102.     }
  103.     ["code"]=>
  104.     array(1) {
  105.       ["contains"]=>
  106.       &int(40005)
  107.     }
  108.     ["message"]=>
  109.     array(1) {
  110.       ["contains"]=>
  111.       &NULL
  112.     }
  113.   }
  114.   ["__tField_LockRegistration":"ILLI\Core\Exception\Exception":private]=>
  115.   bool(false)
  116.   ["__tField_LockAllFields":"ILLI\Core\Exception\Exception":private]=>
  117.   bool(false)
  118.   ["__tField_Hash":"ILLI\Core\Exception\Exception":private]=>
  119.   string(32) "000000001a03035f000000003fdbc2fc"
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement