public function testCode()
 {
     $e = new Zend_Exception('msg', 100);
     $this->assertEquals(100, $e->getCode());
 }
Example #2
0
 /**
  * 
  * Maps the provided information to the corresponding fields
  * @param string|Zend_Exception $input
  * @return array @extraFields
  */
 protected function getExtraFieldsArray($input = null)
 {
     if ($input instanceof Zend_Exception) {
         $extraFields = array('logType' => 'exception', 'projectName' => $this->projectName, 'environment' => $this->environment, 'errorNumber' => $input->getCode(), 'file' => $input->getFile(), 'line' => $input->getLine(), 'stacktrace' => json_encode($input->getTrace()));
     } else {
         $extraFields = array('logType' => $this->logType, 'projectName' => $this->projectName, 'environment' => $this->environment);
     }
     return $extraFields;
 }