1 // SSException.h: interface for the SSException class.
3 //////////////////////////////////////////////////////////////////////
5 #if !defined(AFX_SSEXCEPTION_H__56E9DD10_4947_45AB_A7C5_F732DE0538A5__INCLUDED_)
6 #define AFX_SSEXCEPTION_H__56E9DD10_4947_45AB_A7C5_F732DE0538A5__INCLUDED_
10 #endif // _MSC_VER > 1000
15 //---------------------------------------------------------------------------
16 class SSException
: public std::exception
19 SSException(const std::string
& str
)
20 : exception (""), m_Str (str
)
23 virtual ~SSException()
25 virtual const char *what() const
26 {return (m_Str
.c_str()); }
28 virtual void _Doraise() const
36 //---------------------------------------------------------------------------
37 class SSRecordException
: public SSException
40 SSRecordException(const std::string
& str
)
45 virtual void _Doraise() const
50 //---------------------------------------------------------------------------
52 class SSUnknownActionException
: public SSException
55 SSUnknownActionException (short action
, SSRecordPtr record
)
56 : m_Action (action
), m_record (record
), SSException ("unknown action")
59 virtual const char *what() const
61 std::ostringstream stream
;
62 stream
<< m_Str
<< " " << m_Action
<< " at offset 0x" << std::hex
<< m_record
->GetOffset();
63 return (stream
.str().c_str ());
70 #endif // !defined(AFX_SSEXCEPTION_H__56E9DD10_4947_45AB_A7C5_F732DE0538A5__INCLUDED_)