forked from FlatGlobus/WTLBuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ScriptError.h
90 lines (76 loc) · 2.3 KB
/
ScriptError.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Copyright (C) FlatGlobus(wtlbuilder@gmail.com) All rights reserved.
//
// This file is a part of the WTLBuilder.
// The use and distribution terms for this software are covered by the
// Microsoft Public License (http://opensource.org/licenses/MS-PL)
// which can be found in the file MS-PL.txt at the root folder.
#ifndef __SCRIPT_ERROR_H
#define __SCRIPT_ERROR_H
/////////////////////////////////////////////////////////////////////////////////////////
#include <vector>
/////////////////////////////////////////////////////////////////////////////////////////
using namespace std;
class CScriptError
{
public:
CScriptError();
CScriptError(const CString &error, const CString & descr, const CString &func, long line, long pos);
CScriptError(const CString &file,const CString &error, const CString & descr, const CString &func, long line, long pos);
const CString & GetError();
const CString & GetDescr();
void SetFile(const CString & _file);
const CString & GetFile();
long GetLine();
long GetPos();
const CString & GetFunc();
protected:
long line;
long pos;
CString error;
CString descr;
CString file;
CString func;
};
typedef std::vector<CScriptError *> CScriptErrorVector;
///////////////////////////////////////////////////////////////////////////////////////
inline CScriptError::CScriptError()
{
}
inline CScriptError::CScriptError(const CString &_error, const CString & _descr, const CString &_func, long _line, long _pos):
error(_error),descr(_descr),line(_line),pos(_pos),func(_func)
{
}
inline CScriptError::CScriptError(const CString & _file,const CString &_error, const CString & _descr, const CString &_func, long _line, long _pos):
file(_file),error(_error),descr(_descr),line(_line),pos(_pos),func(_func)
{
}
inline const CString & CScriptError::GetError()
{
return error;
}
inline const CString & CScriptError::GetDescr()
{
return descr;
}
inline long CScriptError::GetLine()
{
return line;
}
inline long CScriptError::GetPos()
{
return pos;
}
inline void CScriptError::SetFile(const CString & _file)
{
file = _file;
}
inline const CString & CScriptError::GetFile()
{
return file;
}
inline const CString & CScriptError::GetFunc()
{
return func;
}
/////////////////////////////////////////////////////////////////////////////////////////
#endif