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 COMMON_ERROR_H
23 #define COMMON_ERROR_H
24 
25 #include "common/str.h"
26 
27 namespace Common {
28 
47 enum ErrorCode {
48  kNoError = 0,
49 
54 
57 
61 
65 
69 
71 
73 };
74 
81 class Error {
82 protected:
85 public:
91 
97  Error(ErrorCode code, const String &extra);
98 
102  String getDesc() const;
103 
108 
112  ErrorCode getCode() const { return _code; }
113 };
114 
117 } // End of namespace Common
118 
119 #endif //COMMON_ERROR_H
U32String getTranslatedDesc() const
Engine initialization: Audio device initialization failed.
Definition: error.h:53
Definition: str.h:59
Unable to write data due to missing write permission.
Definition: error.h:56
Failed to read a file (permission denied?).
Definition: error.h:63
Definition: error.h:81
ErrorCode getCode() const
Definition: error.h:112
String getDesc() const
ErrorCode
Definition: error.h:47
Unable to read data due to missing read permission.
Definition: error.h:55
No error occurred.
Definition: error.h:48
Engine initialization: No game data was found in the specified location.
Definition: error.h:50
Engine initialization: Game ID not supported by this (Meta)Engine.
Definition: error.h:51
The specified path does not exist.
Definition: error.h:58
ErrorCode _code
Definition: error.h:83
User has canceled the launching of the game.
Definition: error.h:70
Definition: ustr.h:57
Definition: algorithm.h:29
Engine initialization: Engine does not support backend&#39;s color mode.
Definition: error.h:52
Failed to find a MetaEnginePlugin.
Definition: error.h:66
Error(ErrorCode code=kUnknownError)
The plugin does not support listing save states.
Definition: error.h:68
The specified path does not point to a directory.
Definition: error.h:59
The specified path does not point to a file.
Definition: error.h:60
Catch-all error, used if no other error code matches.
Definition: error.h:72
Failed creating a (savestate) file.
Definition: error.h:62
Failed to find an Engine plugin to handle target.
Definition: error.h:67
Failure to write data - disk full?
Definition: error.h:64
String _desc
Definition: error.h:84