Ejemplo n.º 1
0
 /**
  * Constructs a new exception.
  *
  * $name specifies the name of the name of the handler to use.
  * $known is a list of the known database handlers.
  *
  * @param string $name
  * @param array(string) $known
  */
 public function __construct($name, array $known = array())
 {
     if ($name == '' || $name == null) {
         $name = 'no name provided';
     }
     $message = "Could not find the database handler: '{$name}'.";
     if (count($known) > 0) {
         $knownMessage = ' The known databases are: ' . implode(', ', $known) . '.';
         $message .= $knownMessage;
     }
     parent::__construct($message);
 }
Ejemplo n.º 2
0
 /**
  * Constructs a new exception.
  *
  * @param string $option
  * @param string $variableName
  */
 public function __construct($option, $variableName)
 {
     parent::__construct("The option '{$option}' is required in the parameter '{$variableName}'.");
 }
Ejemplo n.º 3
0
 /**
  * Constructs a new exception with the message $msg.
  *
  * @param string $msg
  */
 public function __construct($msg)
 {
     $message = "There was a transaction error caused by unmatched beginTransaction()/commit() calls: {$msg}";
     parent::__construct($message);
 }