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

  1. #ifndef __GREXCEPT_H
  2. #define __GREXCEPT_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:  Graphics Exception Classes
  17. //
  18. //  Author:  John M. Miano  miano@colosseumbuilders.com
  19. //
  20.  
  21. #include <stdexcept>
  22.  
  23. class EGraphicsException : public std::logic_error
  24. {
  25. public:
  26.     EGraphicsException (std::string msg) : std::logic_error (msg.c_str ()) {}
  27. } ;
  28.  
  29. class ESubscriptOutOfRange : public EGraphicsException
  30. {
  31. public:
  32.   ESubscriptOutOfRange () : EGraphicsException ("Subscript out of range") {}
  33. } ;
  34.  
  35. class EInvalidBitCount : public EGraphicsException
  36. {
  37. public:
  38.   EInvalidBitCount () : EGraphicsException ("Invalid bit count") {}
  39. } ;
  40.  
  41. class EGraphicsAbort : EGraphicsException
  42. {
  43. public:
  44.   EGraphicsAbort () : EGraphicsException ("Abort") {}
  45. } ;
  46.  
  47. #endif
  48.