Example #1
0
 /**
  * @test
  */
 public function shouldGetErrorWithClassForDebug()
 {
     //given
     Config::overrideProperty('debug')->with(true);
     $userException = new UserException('Winter is coming!');
     //when
     $error = Error::forException($userException);
     //then
     $this->assertEquals('Ouzo\\UserException: Winter is coming!', $error->message);
 }
Example #2
0
 public static function forException($httpCode, Exception $exception)
 {
     return new OuzoExceptionData($httpCode, array(Error::forException($exception)), $exception->getTraceAsString());
 }