myexception.php
343 Bytes
<?php
abstract class MyException extends Exception
{
protected $msg = array ();
public function __construct ($code)
{
parent::__construct ($this->msg [$code], $code);
}
public function __toString ()
{
return __CLASS__ . "[{$this->code}] at " . $this->getFile () .
"(" . $this->getLine . "): {$this->message}\n";
}
}
?>