/** * Construct a new exception indicating an invalid format. * * @param int $type * the type of IFD. * * @param PelTag $tag * the tag for which the violation was found. * * @param PelFormat $found * the format found. * * @param PelFormat $expected * the expected format. */ public function __construct($type, $tag, $found, $expected) { parent::__construct('Unexpected format found for %s tag: PelFormat::%s. ' . 'Expected PelFormat::%s instead.', PelTag::getName($type, $tag), strtoupper(PelFormat::getName($found)), strtoupper(PelFormat::getName($expected))); $this->tag = $tag; $this->type = $type; }
/** * Construct a new exception indicating a wrong number of * components. * * @param int $type * the type of IFD. * * @param PelTag $tag * the tag for which the violation was found. * * @param int $found * the number of components found. * * @param int $expected * the expected number of components. */ public function __construct($type, $tag, $found, $expected) { parent::__construct('Wrong number of components found for %s tag: %d. ' . 'Expected %d.', PelTag::getName($type, $tag), $found, $expected); $this->tag = $tag; $this->type = $type; }