コード例 #1
0
ファイル: ExceptionWrapper.php プロジェクト: cargomedia/cm
 public function __construct(CM_Exception $e)
 {
     parent::__construct($e);
     $formatter = new CM_ExceptionHandling_Formatter_Plain();
     $serializedException = new CM_ExceptionHandling_SerializableException($e);
     $this->message = get_class($e) . ': ' . $e->getMessage() . PHP_EOL . $formatter->getMetaInfo($serializedException);
 }
コード例 #2
0
ファイル: Cli.php プロジェクト: cargomedia/cm
 protected function _printException(Exception $exception)
 {
     $output = new CM_OutputStream_Stream_StandardError();
     $formatter = new CM_ExceptionHandling_Formatter_Plain();
     $output->writeln($formatter->formatException($exception));
 }