ScummVM API documentation
Error codes

Description

Commonly used error codes.

Classes

class  Common::Error
 

Enumerations

enum  Common::ErrorCode {
  Common::kNoError = 0, Common::kNoGameDataFoundError, Common::kUnsupportedGameidError, Common::kUnsupportedColorMode,
  Common::kAudioDeviceInitFailed, Common::kReadPermissionDenied, Common::kWritePermissionDenied, Common::kPathDoesNotExist,
  Common::kPathNotDirectory, Common::kPathNotFile, Common::kCreatingFileFailed, Common::kReadingFailed,
  Common::kWritingFailed, Common::kMetaEnginePluginNotFound, Common::kEnginePluginNotFound, Common::kEnginePluginNotSupportSaves,
  Common::kUserCanceled, Common::kUnknownError
}
 

Enumeration Type Documentation

◆ ErrorCode

Error codes that may be reported by plugins under various circumstances.

Note
Error names should follow the pattern k-NOUN/ACTION-CONDITION-Error. So kPathInvalidError is correct, but the following are not: kInvalidPath, kPathInvalid, kPathIsInvalid, kInvalidPathError.
Enumerator
kNoError 

No error occurred.

kNoGameDataFoundError 

Engine initialization: No game data was found in the specified location.

kUnsupportedGameidError 

Engine initialization: Game ID not supported by this (Meta)Engine.

kUnsupportedColorMode 

Engine initialization: Engine does not support backend's color mode.

kAudioDeviceInitFailed 

Engine initialization: Audio device initialization failed.

kReadPermissionDenied 

Unable to read data due to missing read permission.

kWritePermissionDenied 

Unable to write data due to missing write permission.

kPathDoesNotExist 

The specified path does not exist.

kPathNotDirectory 

The specified path does not point to a directory.

kPathNotFile 

The specified path does not point to a file.

kCreatingFileFailed 

Failed creating a (savestate) file.

kReadingFailed 

Failed to read a file (permission denied?).

kWritingFailed 

Failure to write data - disk full?

kMetaEnginePluginNotFound 

Failed to find a MetaEnginePlugin. This should never happen, because all MetaEngines must always be built into the executable, regardless if the engine plugins are present or not.

kEnginePluginNotFound 

Failed to find an Engine plugin to handle target.

kEnginePluginNotSupportSaves 

The plugin does not support listing save states.

kUserCanceled 

User has canceled the launching of the game.

kUnknownError 

Catch-all error, used if no other error code matches.