Beispiel #1
0
function SimpleSAML_exception_handler(Exception $exception)
{
    if ($exception instanceof SimpleSAML_Error_Error) {
        $exception->show();
    } else {
        $e = new SimpleSAML_Error_Error('UNHANDLEDEXCEPTION', $exception);
        $e->show();
    }
}
Beispiel #2
0
/**
 * Calls the show method on the given exception.
 *
 * @param	Exception	$e
 */
function handleException(\Exception $e) {
	if ($e instanceof IPrintableException || $e instanceof \wcf\system\exception\IPrintableException) {
		$e->show();
		exit;
	}
	
	print $e;
}
Beispiel #3
0
 /**
  * Calls the show method on the given exception.
  *
  * @param	\Exception	$e
  */
 public static final function handleException(\Exception $e)
 {
     if ($e instanceof exception\IPrintableException) {
         $e->show();
         exit;
     }
     // repack Exception
     self::handleException(new exception\SystemException($e->getMessage(), $e->getCode(), '', $e));
 }
 /**
  * Calls the show method on the given exception.
  * 
  * @param	\Exception	$e
  */
 public static final function handleException(\Exception $e)
 {
     try {
         if ($e instanceof SystemException) {
             $e->show();
             exit;
         }
         // repack Exception
         self::handleException(new SystemException($e->getMessage(), $e->getCode(), '', $e));
     } catch (\Exception $exception) {
         die("<pre>DNS::handleException() Unhandled exception: " . $exception->getMessage() . "\n\n" . $exception->getTraceAsString());
     }
 }
 /**
  * Calls the show method on the given exception.
  * 
  * @param	Exception	$e	
  */
 public static final function handleException(Exception $e)
 {
     if ($e instanceof PrintableException) {
         $e->show();
         exit;
     }
     print $e;
 }