00001 // Copyright (C) 2001 Jean-Marc Valin 00002 00003 #ifndef EXCEPTION_OBJECT_H 00004 #define EXCEPTION_OBJECT_H 00005 00006 namespace FD { 00007 00008 class ExceptionObject : public Object { 00009 00010 BaseException *e; 00011 public: 00012 00013 ExceptionObject(BaseException *_e) 00014 : e(_e) 00015 { 00016 00017 } 00018 00019 void doThrow() 00020 { 00021 throw e; 00022 } 00023 00024 void printOn(std::ostream &out) const 00025 { 00026 e->print(out); 00027 } 00028 }; 00029 00030 }//namespace FD 00031 00032 #endif