home *** CD-ROM | disk | FTP | other *** search
/ Compressed Image File Formats / CompressedImageFileFormatsJohnMiano.iso / pc / Examples / c06 / inc / jpgexcep.h < prev   
Encoding:
C/C++ Source or Header  |  1998-12-17  |  1.7 KB  |  71 lines

  1. #ifndef __JPGEXCEP_H
  2. #define __JPGEXCEP_H
  3. //
  4. // Copyright (c) 1997,1998 Colosseum Builders, Inc.
  5. // All rights reserved.
  6. //
  7. // Colosseum Builders, Inc. makes no warranty, expressed or implied
  8. // with regards to this software. It is provided as is.
  9. //
  10. // See the README.TXT file that came with this software for restrictions
  11. // on the use and redistribution of this file or send E-mail to
  12. // info@colosseumbuilders.com
  13. //
  14.  
  15. //
  16. //  Title:  JPEG Exception Definitions
  17. //
  18. //  Author:  John M. Miano  miano@colosseumbuilders.com
  19. //
  20.  
  21. #include "grexcept.h"
  22.  
  23. // Base class for trappable JPEG errors.
  24. class EJpegError : public EGraphicsException
  25. {
  26. public:
  27.   EJpegError (const std::string &msg) : EGraphicsException (msg) {}
  28. } ;
  29.  
  30. // Exception that makes reading the image impossible.
  31. class EJpegFatal : public EGraphicsException
  32. {
  33. public:
  34.   EJpegFatal (const std::string &msg) : EGraphicsException (msg) {}
  35. } ;
  36.  
  37. // Exception thrown when the callback function returns a values
  38. // indicating the caller wants to abort the decode.
  39. class EJpegAbort : public EGraphicsException
  40. {
  41. public:
  42.   EJpegAbort  () : EGraphicsException ("JPEG Aborted") {}
  43. } ;
  44.  
  45. class EJpegValueOutOfRange : public EJpegError
  46. {
  47. public:
  48.   EJpegValueOutOfRange () : EJpegError ("Value out of range") {}
  49. } ;
  50.  
  51. class EJpegIndexOutOfRange : public EJpegError
  52. {
  53. public:
  54.   EJpegIndexOutOfRange () : EJpegError ("Index out of range") {}
  55. } ;
  56.  
  57. class EJpegBadOutputParameter : public EJpegError
  58. {
  59. public:
  60.   EJpegBadOutputParameter (const std::string &msg) : EJpegError (msg) {}
  61. } ;
  62.  
  63. class EJpegBadData : public EJpegError
  64. {
  65. public:
  66.   EJpegBadData (const std::string &msg = "Bad input") : EJpegError (msg) {}
  67. } ;
  68.  
  69. #endif
  70.  
  71.