Changeset 2289 for trunk/modules/unit_test/libraries/Unit_Test.php
- Timestamp:
- 03/12/2008 10:32:25 AM (9 months ago)
- Files:
-
- 1 modified
-
trunk/modules/unit_test/libraries/Unit_Test.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/unit_test/libraries/Unit_Test.php
r2288 r2289 390 390 class Kohana_Unit_Test_Exception extends Exception { 391 391 392 protected $message = '';393 392 protected $debug = NULL; 394 protected $file = ''; 395 protected $line = ''; 396 397 /** 398 * Set exception message and debug 393 394 /** 395 * Sets exception message and debug info. 399 396 * 400 397 * @param string message … … 405 402 { 406 403 // Failure message 407 $this->message = (string) $message;404 parent::__construct($message); 408 405 409 406 // Extra user-defined debug info 410 407 $this->debug = $debug; 411 408 412 // Retrieve failure location409 // Overwrite failure location 413 410 $trace = $this->getTrace(); 414 411 $this->file = $trace[0]['file']; … … 417 414 418 415 /** 419 * Magically gets an object property. 420 * 421 * @param string property key 422 * @return mixed variable value if the key is found 423 * @return void if the key is not found 424 */ 425 public function __get($key) 426 { 427 if (isset($this->$key)) 428 return $this->$key; 416 * Returns the user-defined debug info 417 * 418 * @return mixed debug property 419 */ 420 public function getDebug() 421 { 422 return $this->debug; 429 423 } 430 424
