00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _DECAF_LANG_THROWABLE_H_
00019 #define _DECAF_LANG_THROWABLE_H_
00020
00021
00022 #include <string>
00023 #include <vector>
00024 #include <iostream>
00025 #include <exception>
00026
00027 #include <decaf/util/Config.h>
00028
00029 namespace decaf{
00030 namespace lang{
00031
00044 class DECAF_API Throwable : public std::exception {
00045 public:
00046
00047 Throwable();
00048
00049 virtual ~Throwable() throw();
00050
00057 virtual std::string getMessage() const = 0;
00058
00068 virtual const std::exception* getCause() const = 0;
00069
00075 virtual void initCause( const std::exception* cause ) = 0;
00076
00082 virtual void setMark( const char* file, const int lineNumber ) = 0;
00083
00090 virtual Throwable* clone() const = 0;
00091
00097 virtual std::vector< std::pair< std::string, int> > getStackTrace() const = 0;
00098
00102 virtual void printStackTrace() const = 0;
00103
00108 virtual void printStackTrace( std::ostream& stream ) const = 0;
00109
00114 virtual std::string getStackTraceString() const = 0;
00115
00116 };
00117
00118 }}
00119
00120 #endif