Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
 /**
  * Construct an internal archive exception.
  *
  * @param string $message
  */
 public function __construct($message)
 {
     parent::__construct("Internal error: " . $message);
 }
Ejemplo n.º 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.");
 }
Ejemplo n.º 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.");
 }
Ejemplo n.º 6
0
Archivo: io.php Proyecto: bmdevel/ezc
 /**
  * Constructs a new IO exception.
  *
  * @param string $message
  */
 public function __construct($message)
 {
     parent::__construct($message);
 }
Ejemplo n.º 7
0
 /**
  * Constructs a new exception for empty archive.
  */
 public function __construct()
 {
     parent::__construct("The archive is empty.");
 }
Ejemplo n.º 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.");
 }