Source for file PelException.php

Documentation is available at PelException.php

  1. <?php
  2.  
  3. /*  PEL: PHP Exif Library.  A library with support for reading and
  4.  *  writing all Exif headers in JPEG and TIFF images using PHP.
  5.  *
  6.  *  Copyright (C) 2004, 2005  Martin Geisler.
  7.  *
  8.  *  This program is free software; you can redistribute it and/or modify
  9.  *  it under the terms of the GNU General Public License as published by
  10.  *  the Free Software Foundation; either version 2 of the License, or
  11.  *  (at your option) any later version.
  12.  *
  13.  *  This program is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  *  GNU General Public License for more details.
  17.  *
  18.  *  You should have received a copy of the GNU General Public License
  19.  *  along with this program in the file COPYING; if not, write to the
  20.  *  Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  21.  *  Boston, MA 02110-1301 USA
  22.  */
  23.  
  24. /* $Id$ */
  25.  
  26.  
  27. /**
  28.  * Standard PEL exception.
  29.  *
  30.  * @author Martin Geisler <mgeisler@users.sourceforge.net>
  31.  * @version $Revision$
  32.  * @date $Date$
  33.  * @license http://www.gnu.org/licenses/gpl.html GNU General Public
  34.  *  License (GPL)
  35.  * @package PEL
  36.  */
  37.  
  38. /**
  39.  * A printf() capable exception.
  40.  *
  41.  * This class is a simple extension of the standard Exception class in
  42.  * PHP, and all the methods defined there retain their original
  43.  * meaning.
  44.  *
  45.  * @package PEL
  46.  * @subpackage Exception
  47.  */
  48. class PelException extends Exception {
  49.  
  50.   /**
  51.    * Construct a new PEL exception.
  52.    *
  53.    * @param string $fmt an optional format string can be given.  It
  54.    *  will be used as a format string for vprintf().  The remaining
  55.    *  arguments will be available for the format string as usual with
  56.    *  vprintf().
  57.    *
  58.    * @param mixed $args,... any number of arguments to be used with
  59.    *  the format string.
  60.    */
  61.   function __construct(/* fmt, args... */{
  62.     $args func_get_args();
  63.     $fmt array_shift($args);
  64.     parent::__construct(vsprintf($fmt$args));
  65.   }
  66. }
  67.  
  68.  
  69. /**
  70.  * Exception throw if invalid data is found.
  71.  *
  72.  * @author Martin Geisler <mgeisler@users.sourceforge.net>
  73.  * @package PEL
  74.  * @subpackage Exception
  75.  */
  76.  
  77. /**
  78.  * Exception throw if an invalid argument is passed.
  79.  *
  80.  * @author Martin Geisler <mgeisler@users.sourceforge.net>
  81.  * @package PEL
  82.  * @subpackage Exception
  83.  */
  84.  
  85. ?>

Documentation generated on Thu, 05 May 2011 07:19:10 +0200 by phpDocumentor 1.4.3