public function testCanTellWhatExceptionIsSymptomOf() { // all of the following are valid causes $this->assertTrue($this->fixtureWithSymptom->wasCausedBy('Test_Exception_Symptom')); $this->assertTrue($this->fixtureWithSymptom->wasCausedBy('Test_Exception_RootCause')); $this->assertTrue($this->fixtureWithSymptom->wasCausedBy("Exception")); // this is not a valid cause $this->assertFalse($this->fixtureWithRootCause->wasCausedBy('Test_Exception_Symptom')); }
public function next() { // we can go no further if we're already off the end // of this list if ($this->current === null) { return false; } // if we are at the end of the list, time to fall off // the end // // the last item in the list can be one of two types // of Exception: // // a) A generic PHP 5 Exception object, or // b) A framework Exception that has no cause data if (!$this->current instanceof MF_Exception_Enterprise || !$this->current->hasCause()) { $this->current = null; $this->level++; return false; } // if we get here, then we have not yet reached the end // of the list $this->current = $this->current->getCause(); $this->level++; return true; }
public function __construct($formatString, $aParams, Exception $oCause = null) { parent::__construct(500, 1, $formatString, $aParams, $oCause); }
public function __construct($httpCode, $errorCode, $formatString, $aParams, Exception $oCause = null) { parent::__construct($httpCode, $errorCode, $formatString, $aParams, $oCause); }