ScummVM API documentation
error.h
1
/* ScummVM - Graphic Adventure Engine
2
*
3
* ScummVM is the legal property of its developers, whose names
4
* are too numerous to list here. Please refer to the COPYRIGHT
5
* file distributed with this source distribution.
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*
20
*/
21
22
#ifndef ERROR_H_
23
#define ERROR_H_
24
25
#include "common/str.h"
26
27
namespace
Wintermute
{
28
29
enum
ErrorLevel {
30
SUCCESS,
31
NOTICE,
32
WARNING,
33
ERROR
34
};
35
36
enum
ErrorCode
{
37
OK,
38
NO_SUCH_SOURCE,
39
COULD_NOT_OPEN,
40
NO_SUCH_LINE,
41
NOT_ALLOWED,
42
NO_SUCH_BYTECODE,
43
DUPLICATE_BREAKPOINT,
44
NO_SUCH_BREAKPOINT,
45
WRONG_TYPE,
46
PARSE_ERROR,
47
NOT_YET_IMPLEMENTED,
48
SOURCE_PATH_NOT_SET,
49
ILLEGAL_PATH,
50
UNKNOWN_ERROR
51
};
52
53
54
class
Error
{
55
const
ErrorLevel _errorLevel;
56
const
ErrorCode _errorCode;
57
const
int
_errorExtraInt;
58
const
Common::String
_errorExtraString;
59
public
:
60
Error
(ErrorLevel, ErrorCode);
61
Error
(ErrorLevel, ErrorCode,
int
errorExtraInt);
62
Error
(ErrorLevel, ErrorCode,
Common::String
errorExtraString);
63
Error
(ErrorLevel, ErrorCode,
Common::String
errorExtraString,
int
errorExtraInt);
64
ErrorLevel getErrorLevel()
const
;
65
ErrorCode getErrorCode()
const
;
66
Common::String
getErrorLevelStr()
const
;
67
Common::String
getErrorDisplayStr()
const
;
68
};
69
70
}
// End of namespace Wintermute
71
72
#endif
/* ERROR_H_ */
Common::String
Definition:
str.h:59
Common::ErrorCode
ErrorCode
Definition:
error.h:47
Wintermute::Error
Definition:
error.h:54
Wintermute
Definition:
achievements_tables.h:27
engines
wintermute
debugger
error.h
Generated on Sun Dec 22 2024 09:05:33 for ScummVM API documentation by
1.8.13