/** * Constructor * @param string $filename Filename * @param FormatInterface $format Format * @param int $code Exception code * @param \Exception $previous Previous exception */ public function __construct($filename, FormatInterface $format, $code = 0, \Exception $previous = null) { $this->filename = $filename; $this->format = $format; $message = sprintf('There are no available methods to decompress format "%s"', $format->getName()); parent::__construct($message, $code, $previous); }
/** * Constructor. * @param MethodInterface $method Method * @param FormatInterface $format Format * @param int $code Exception code * @param \Exception $previous Previous exception */ public function __construct(MethodInterface $method, FormatInterface $format, $code = 0, \Exception $previous = null) { $this->method = $method; $this->format = $format; $message = sprintf('Method "%s" is not supported for format %s', $method->getName(), $format->getName()); parent::__construct($message, $code, $previous); }