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 Martin Geisler <gimpster@users.sourceforge.net>
  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., 59 Temple Place, Suite 330,
  21. * Boston, MA 02111-1307 USA
  22. */
  23.  
  24. /* PelException.php,v 1.6 2004/07/21 16:14:13 gimpster Exp */
  25.  
  26.  
  27. /**
  28. * Standard PEL exception.
  29. *
  30. * @author Martin Geisler <gimpster@users.sourceforge.net>
  31. * @version 1.6
  32. * @date 2004/07/21 16:14:13
  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 sprintf(). The remaining
  55. * arguments will be available for the format string as usual with
  56. * sprintf().
  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. $str = array_shift($args);
  64. parent::__construct(vsprintf($str, $args));
  65. }
  66. }
  67.  
  68.  
  69. /**
  70. * Exception throw if invalid data is found.
  71. *
  72. * @author Martin Geisler <gimpster@users.sourceforge.net>
  73. * @package PEL
  74. * @subpackage Exception
  75. */
  76. class PelInvalidDataException extends PelException {}
  77.  
  78. ?>

SourceForge.net Logo Documentation generated on Wed, 21 Jul 2004 19:13:08 +0200 by phpDocumentor 1.3.0RC3