Example #1
0
 /**
  * Construct exception from errnous string and current position
  *
  * @param int $level
  * @param string $message
  * @param string $file
  * @param int $line
  * @param int $position
  * @param Exception $exception
  * @return void
  */
 public function __construct($level, $message, $file = null, $line = null, $position = null, Exception $exception = null)
 {
     $this->parseError = $message;
     $message = "{$this->errorString}: {$this->levelMapping[$level]}: '{$message}'";
     if ($file !== null) {
         $message .= " in file '{$file}'";
     }
     if ($line !== null) {
         $message .= " in line {$line} at position {$position}";
     }
     parent::__construct($message . '.', 0, $exception);
 }
 /**
  * Construct exception from directive name
  *
  * @param string $name
  * @return void
  */
 public function __construct($name)
 {
     parent::__construct("No directive handler registered for directive '{$name}'.");
 }
Example #3
0
 /**
  * Creates a new exception.
  * 
  * @param DOMNode $affectedNode 
  * @param string $message 
  */
 public function __construct(DOMNode $affectedNode, $message)
 {
     parent::__construct("The DocBook node {$node->localName} was invalid: {$message}");
 }
 /**
  * Construct exception from errnous string and current position
  *
  * @param int $line
  * @param int $position
  * @param string $string
  * @return void
  */
 public function __construct($line, $position, $string)
 {
     parent::__construct("Could not tokenize string at line {$line} char {$position}: '" . substr($string, 0, 10) . "'.");
 }
 /**
  * Construct exception from text role name
  *
  * @param string $name
  */
 public function __construct($name)
 {
     parent::__construct("No text role handler registered for text role '{$name}'.");
 }
 /**
  * Construct exception from directive name
  * 
  * @param string $name 
  * @return void
  */
 public function __construct($name)
 {
     parent::__construct("No plugin handler registered for plugin '{$name}'.");
 }
Example #7
0
 /**
  * Construct exception from errnous string and current position
  *
  * @param string $class
  * @param int $line
  * @param int $position
  */
 public function __construct($class, $line = 0, $position = 0)
 {
     parent::__construct("Could not find visitor for '{$class}' at {$line}, {$position}.");
 }
Example #8
0
 /**
  * Construct exception from array with XML errors
  * 
  * @param array $errors 
  * @return void
  */
 public function __construct(array $errors)
 {
     $this->errors = $errors;
     parent::__construct("Errors occured while parsing the XML.");
 }
Example #9
0
 /**
  * Construct exception from errnous string and current position
  * 
  * @param int $level 
  * @param string $message 
  * @param string $file 
  * @param int $line 
  * @param int $position 
  * @return void
  */
 public function __construct($level, $message, $file, $line, $position)
 {
     $levelMapping = array(E_NOTICE => 'Notice', E_WARNING => 'Warning', E_ERROR => 'Error', E_PARSE => 'Fatal error');
     parent::__construct(sprintf("Visitor error: %s: '%s' in line %d at position %d.", $levelMapping[$level], $message, $line, $position));
 }
Example #10
0
 /**
  * Construct exception from errnous string and current position
  *
  * @param string $font
  * @return void
  */
 public function __construct($font)
 {
     parent::__construct(sprintf("Unknown font '%s' - cannot be rendered. Try to register the font using @font-face.", $font));
 }
 /**
  * Creates a new exception for the given $properties.
  * 
  * @param ezcDocumentOdtFormattingProperties $properties 
  */
 public function __construct(ezcDocumentOdtFormattingProperties $properties)
 {
     parent::__construct("Formatting properties of type '{$properties->type}' are already set.");
 }
Example #12
0
 /**
  * Construct exception from errnous string and current position
  * 
  * @param int $level 
  * @param string $message 
  * @param string $file 
  * @param int $line 
  * @param int $position 
  * @return void
  */
 public function __construct($level, $message, $file, $line, $position)
 {
     parent::__construct(sprintf("%s: %s: '%s' in line %d at position %d.", $this->errorString, $this->levelMapping[$level], $message, $line, $position));
 }