Пример #1
0
 /**
  * Constructs a new block-size exception for the specified archive.
  *
  * @param string $archiveName
  * @param string $msg
  */
 public function __construct($archiveName, $msg = null)
 {
     $default = "The archive '{$archiveName}' has an invalid block size.";
     if ($msg !== null) {
         $default .= " {$msg}";
     }
     parent::__construct($default);
 }
Пример #2
0
 /**
  * Construct an archive exception.
  *
  * If $expectedValue is provided then it will be included in the exception
  * message thrown.
  *
  * @param mixed $value
  * @param mixed $expectedValue
  */
 public function __construct($value, $expectedValue = null)
 {
     $type = gettype($value);
     if (in_array($type, array('array', 'object', 'resource'))) {
         $value = serialize($value);
     }
     $msg = "The value '{$value}' is incorrect.";
     if ($expectedValue) {
         $msg .= " Allowed values are: " . $expectedValue . '.';
     }
     parent::__construct($msg);
 }
 /**
  * Construct an internal archive exception.
  *
  * @param string $message
  */
 public function __construct($message)
 {
     parent::__construct("Internal error: " . $message);
 }
Пример #4
0
 /**
  * Constructs a new entry prefix exception for the specified file entry.
  *
  * @param string $prefix
  * @param string $fileName
  */
 public function __construct($prefix, $fileName)
 {
     parent::__construct("The prefix '{$prefix}' from the file entry '{$fileName}' is invalid.");
 }
Пример #5
0
 /**
  * Constructs a new checksum exception for the specified file.
  *
  * @param string $file
  */
 public function __construct($file)
 {
     parent::__construct("The checksum of the file '{$file}' is invalid.");
 }
Пример #6
0
Файл: io.php Проект: bmdevel/ezc
 /**
  * Constructs a new IO exception.
  *
  * @param string $message
  */
 public function __construct($message)
 {
     parent::__construct($message);
 }
Пример #7
0
 /**
  * Constructs a new exception for empty archive.
  */
 public function __construct()
 {
     parent::__construct("The archive is empty.");
 }
Пример #8
0
 /**
  * Constructs a new unknown type exception for the specified archive.
  *
  * @param string $archiveName
  */
 public function __construct($archiveName)
 {
     parent::__construct("The type of the archive '{$archiveName}' cannot be determined.");
 }