* @license http://www.gnu.org/licenses/gpl.html GNU General Public * License (GPL) * @package PEL */ /** * Exception indicating that an unexpected format was found. * * The documentation for each tag in {@link PelTag} will detail any * constrains. * * @author Martin Geisler * @package PEL * @subpackage Exception */ class PelUnexpectedFormatException extends PelEntryException { /** * Construct a new exception indicating an invalid format. * * @param int $type * the type of IFD. * * @param int $tag * the tag for which the violation was found as defined in {@link PelTag} * * @param int $found * the format found as defined in {@link PelFormat} * * @param int $expected * the expected as defined in {@link PelFormat} */ 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; } }