示例#1
0
文件: Error.php 项目: azonwan/pingju
 public static function fromPHPError(Bugsnag_Configuration $config, Bugsnag_Diagnostics $diagnostics, $code, $message, $file, $line, $fatal = false)
 {
     $error = new Bugsnag_Error($config, $diagnostics);
     $error->setPHPError($code, $message, $file, $line, $fatal);
     return $error;
 }
示例#2
0
 public function testErrorSeverity()
 {
     $this->error->setPHPError(E_ERROR, "Broken", "file", 123);
     $errorArray = $this->error->toArray();
     $this->assertEquals($errorArray['severity'], 'error');
 }