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,
53 
56 
60 
64 
69 
72 
74 
76 };
77 
84 class Error {
85 protected:
88 public:
94 
100  Error(ErrorCode code, const String &extra);
101 
105  String getDesc() const;
106 
111 
115  ErrorCode getCode() const { return _code; }
116 };
117 
120 } // End of namespace Common
121 
122 #endif //COMMON_ERROR_H
U32String getTranslatedDesc() const
Engine initialization: Audio device initialization failed.
Definition: error.h:52
Definition: str.h:59
Unable to write data due to missing write permission.
Definition: error.h:55
Failed to read a file (permission denied?).
Definition: error.h:62
Definition: error.h:84
ErrorCode getCode() const
Definition: error.h:115
String getDesc() const
ErrorCode
Definition: error.h:47
Unable to read data due to missing read permission.
Definition: error.h:54
No error occurred.
Definition: error.h:48
Engine initialization: No game data was found in the specified location.
Definition: error.h:49
Engine initialization: Game ID not supported by this (Meta)Engine.
Definition: error.h:50
The specified path does not exist.
Definition: error.h:57
ErrorCode _code
Definition: error.h:86
User has canceled the launching of the game.
Definition: error.h:73
Definition: ustr.h:57
Definition: algorithm.h:29
Engine initialization: Engine does not support backend&#39;s color mode.
Definition: error.h:51
Definition: error.h:68
Error(ErrorCode code=kUnknownError)
The plugin does not support listing save states.
Definition: error.h:71
The specified path does not point to a directory.
Definition: error.h:58
The specified path does not point to a file.
Definition: error.h:59
Catch-all error, used if no other error code matches.
Definition: error.h:75
Failed creating a (savestate) file.
Definition: error.h:61
Failed to find an Engine plugin to handle target.
Definition: error.h:70
Failure to write data - disk full?
Definition: error.h:63
String _desc
Definition: error.h:87