00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SKRUNTIMEEXCEPTION_H
00022 #define SKRUNTIMEEXCEPTION_H
00023
00024 #include "skException.h"
00025 #include "skString.h"
00026
00030 class CLASSEXPORT skRuntimeException : public skException
00031 {
00032 public:
00036 skRuntimeException(const skString& location,int line_num,const skString& msg)
00037 : m_LineNum(line_num),m_Msg(msg),m_Location(location){
00038 }
00042 skString getMessage() const {
00043 return m_Msg;
00044 }
00045
00049 skString toString() const {
00050 return skString::addStrings(m_Location.ptr(),s_colon,skString::from(m_LineNum).ptr(),s_Dash,m_Msg.ptr());
00051 }
00055 skString location() const{
00056 return m_Location;
00057 }
00061 int lineNum() const{
00062 return m_LineNum;
00063 }
00064 private:
00065 int m_LineNum;
00066 skString m_Msg;
00067 skString m_Location;
00068 };
00069 #endif