コード例 #1
0
 public function __construct(array $errors)
 {
     $msg = "XML Errors detected\n";
     foreach ($errors as $error) {
         $msg .= "Line {$error->line}: {$error->message}";
     }
     parent::__construct($msg);
 }
コード例 #2
0
 /**
  * Constructor, generates an Exception Message.
  *
  * @param string    $strResourceName Name of directory/file/stream that failed.
  * @param string    $strResourcePath Path of directory/file/stream that failed.
  * @param string    $strMessage      Exception message.
  * @param int       $nCode           Code of failure from this consts.
  * @param Exception $previous        Exception if nested exception.
  */
 public function __construct($strResourceName, $strResourcePath = null, $strMessage = null, $nCode = self::FAILURE_IO, Exception $previous = null)
 {
     $this->strResourceName = $strResourceName;
     $this->strResourcePath = $strResourcePath;
     parent::__construct($this->getErrorMessage($nCode, $strMessage), $nCode, $previous);
 }
コード例 #3
0
 public function __construct($class)
 {
     parent::__construct("Class {$class} could not be loaded.");
 }