/** * @param string $filePath * @param string $code */ public function __construct($filePath, $code) { if (isset(self::$errors[$code])) { $msg = self::$errors[$code]; } else { $msg = sprintf("Unknown error - '%s'", $code); } parent::__construct(sprintf("Failed to open file '%s'. %s.", $filePath, $msg)); }
public function __construct($zip, $code = 0, $prev = null) { parent::__construct("Failed to read entries of ZIP at {$zip}. See error code for more information.", $code, $prev); }
/** * @param string $filePath */ public function __construct($filePath) { parent::__construct(sprintf("Failed to close file '%s'.", $filePath)); }
/** * @param string $uri */ public function __construct($uri) { parent::__construct(sprintf("Failed to read content from uri: '%s'.", $uri)); }
/** * @param string $from * @param string $to */ public function __construct($from, $to) { $message = sprintf("Failed to copy file from '%s' to '%s'.", $from, $to); parent::__construct($message); }
/** * @param string $uri * @param int $content */ public function __construct($uri, $content) { parent::__construct(sprintf("Failed to write content to uri: '%s'. Content:\r\n%s", $uri, $content)); }