Esempio n. 1
0
File: H.php Progetto: hfw/h
 /**
  * Uncaught exception handler. Triggers the `log` and `error` events.
  *
  * Logs all except {@link \H\X} because it's intended for the user and can have large payloads.
  *
  * PHP 5-7 compatible.
  *
  * @param \Exception|\Throwable $thrown
  */
 private static function phpExceptionHandler($thrown)
 {
     !$thrown instanceof X and E::notify('log', $thrown, $thrown->getCode());
     E::notify('error', $thrown);
 }
Esempio n. 2
0
File: X.php Progetto: hfw/h
 /**
  * Convenience function to notify the `log` event.
  *
  * See {@link \H\H::init()}
  *
  * @param string $message
  * @param int $type
  */
 public static function log($message, $type = 100)
 {
     E::notify('log', $message, $type);
 }