source: dev/trunk/jenga/include/smoothie/SmoothieException.h@ 181

Last change on this file since 181 was 181, checked in by dai_9181, 17 years ago
File size: 836 bytes
Line 
1#pragma once
2
3#include <string>
4#include <vector>
5
6class SmoothieException
7{
8 int errorCode;
9 std::string keyword;
10 int nowLine;
11public:
12 SmoothieException( int errorCode, const std::string &keyword, int nowLine )
13 : errorCode( errorCode )
14 , keyword( keyword )
15 , nowLine( nowLine )
16 {
17 }
18 SmoothieException( int errorCode, const std::string &keyword )
19 : errorCode( errorCode )
20 , keyword( keyword )
21 , nowLine( -1 )
22 {
23 }
24 SmoothieException( int errorCode )
25 : errorCode( errorCode )
26 , keyword( "" )
27 , nowLine( -1 )
28 {
29 }
30 SmoothieException()
31 : errorCode( 300 )
32 , keyword( "" )
33 , nowLine( -1 )
34 {
35 }
36
37 int GetErrorCode() const
38 {
39 return errorCode;
40 }
41 const std::string &GetKeyword() const
42 {
43 return keyword;
44 }
45 int GetNowLine() const
46 {
47 return nowLine;
48 }
49};
Note: See TracBrowser for help on using the repository browser.