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