Skip to content

MediaError ​

cpp
#include <Media/MediaError.h>
cpp
struct MediaError

Defined in Media/MediaError.h:20

Error thrown if a media file is invalid or not supported.

Public Methods ​

ReturnNameDescription
const char *errstr virtual const inline noexcept overrideReturns the name of the error code.
MediaError explicitCreates an error with an error code and a descriptive string.
MediaError inline explicitCreates an error with an error code and a descriptive string.
MediaError inline explicitCreates an error with an error code and a file path.
MediaError inline explicitCreates an error with an error code and a number.
MediaError inline explicitCreates an error with an error code.

errstr ​

virtual const inline noexcept override

cpp
virtual inline const char * errstr() const noexcept override

Defined in Media/MediaError.h:35

Returns the name of the error code.

Reimplements ​


MediaError ​

explicit

cpp
explicit MediaError(long fault, const string & s)

Defined in Media/MediaError.h:54

Creates an error with an error code and a descriptive string.


MediaError ​

inline explicit

cpp
inline explicit MediaError(long fault, const char * s)

Defined in Media/MediaError.h:56

Creates an error with an error code and a descriptive string.


MediaError ​

inline explicit

cpp
inline explicit MediaError(long fault, const fs::path & p)

Defined in Media/MediaError.h:58

Creates an error with an error code and a file path.


MediaError ​

inline explicit

cpp
inline explicit MediaError(long fault, std::integral auto v)

Defined in Media/MediaError.h:60

Creates an error with an error code and a number.


MediaError ​

inline explicit

cpp
inline explicit MediaError(long fault)

Defined in Media/MediaError.h:62

Creates an error with an error code.

Public Static Attributes ​

ReturnNameDescription
longOK static constexprNo error.
longUNKNOWN static constexprUnclassified.
longSNAP_TOO_OLD static constexprSnapshot was created with an older version.
longSNAP_TOO_NEW static constexprSnapshot was created with a later version.
longSNAP_IS_BETA static constexprSnapshot was created with a beta release.
longSNAP_CORRUPTED static constexprSnapshot data is corrupted.
longMISSING_ROM_KEY static constexprNo "rom.key" file was found (encrypted ROMs).
longINVALID_ROM_KEY static constexprThe ROM key is invalid (encrypted ROMs).

OK ​

static constexpr

cpp
long OK =   0

Defined in Media/MediaError.h:22

No error.


UNKNOWN ​

static constexpr

cpp
long UNKNOWN =   1

Defined in Media/MediaError.h:23

Unclassified.


SNAP_TOO_OLD ​

static constexpr

cpp
long SNAP_TOO_OLD = 10

Defined in Media/MediaError.h:26

Snapshot was created with an older version.


SNAP_TOO_NEW ​

static constexpr

cpp
long SNAP_TOO_NEW = 11

Defined in Media/MediaError.h:27

Snapshot was created with a later version.


SNAP_IS_BETA ​

static constexpr

cpp
long SNAP_IS_BETA = 12

Defined in Media/MediaError.h:28

Snapshot was created with a beta release.


SNAP_CORRUPTED ​

static constexpr

cpp
long SNAP_CORRUPTED = 13

Defined in Media/MediaError.h:29

Snapshot data is corrupted.


MISSING_ROM_KEY ​

static constexpr

cpp
long MISSING_ROM_KEY = 30

Defined in Media/MediaError.h:32

No "rom.key" file was found (encrypted ROMs).


INVALID_ROM_KEY ​

static constexpr

cpp
long INVALID_ROM_KEY = 31

Defined in Media/MediaError.h:33

The ROM key is invalid (encrypted ROMs).