Appearance
MediaError
cpp
#include <Media/MediaError.h>cpp
struct MediaErrorDefined in Media/MediaError.h:24
Exception thrown if a media file is invalid or not supported.
Media files are ROMs, snapshots, cartridges, disk images, and similar files. The error code (see fault()) is one of the constants below.
Public Methods
| Return | Name | Description |
|---|---|---|
const char * | errstr virtual const inline noexcept override | Returns the name of the error code. |
MediaError explicit | Creates an error with an error code and a descriptive string. | |
MediaError inline explicit | Creates an error with an error code and a descriptive string. | |
MediaError inline explicit | Creates an error with an error code and a file path. | |
MediaError inline explicit | Creates an error with an error code and a number. | |
MediaError inline explicit | Creates an error with an error code. |
errstr
virtual const inline noexcept override
cpp
virtual inline const char * errstr() const noexcept overrideDefined in Media/MediaError.h:44
Returns the name of the error code.
Reimplements
MediaError
explicit
cpp
explicit MediaError(long fault, const string & s)Defined in Media/MediaError.h:66
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:68
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:70
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:72
Creates an error with an error code and a number.
MediaError
inline explicit
cpp
inline explicit MediaError(long fault)Defined in Media/MediaError.h:74
Creates an error with an error code.
Public Static Attributes
| Return | Name | Description |
|---|---|---|
long | OK static constexpr | No error. |
long | UNKNOWN static constexpr | Unclassified. |
long | SNAP_TOO_OLD static constexpr | Snapshot was created with an older version. |
long | SNAP_TOO_NEW static constexpr | Snapshot was created with a later version. |
long | SNAP_IS_BETA static constexpr | Snapshot was created with a beta release. |
long | SNAP_CORRUPTED static constexpr | Snapshot data is corrupted. |
long | CRT_NO_CARTRIDGE static constexpr | No cartridge attached. |
long | CRT_UNKNOWN static constexpr | Unknown cartridge type. |
long | CRT_UNSUPPORTED static constexpr | Unsupported cartridge type. |
long | CRT_TOO_MANY_PACKETS static constexpr | CRT file contains too many Rom packets. |
long | CRT_CORRUPTED_PACKET static constexpr | CRT file contains a corrupted Rom package. |
OK
static constexpr
cpp
long OK = 0Defined in Media/MediaError.h:26
No error.
UNKNOWN
static constexpr
cpp
long UNKNOWN = 1Defined in Media/MediaError.h:27
Unclassified.
SNAP_TOO_OLD
static constexpr
cpp
long SNAP_TOO_OLD = 10Defined in Media/MediaError.h:30
Snapshot was created with an older version.
SNAP_TOO_NEW
static constexpr
cpp
long SNAP_TOO_NEW = 11Defined in Media/MediaError.h:31
Snapshot was created with a later version.
SNAP_IS_BETA
static constexpr
cpp
long SNAP_IS_BETA = 12Defined in Media/MediaError.h:32
Snapshot was created with a beta release.
SNAP_CORRUPTED
static constexpr
cpp
long SNAP_CORRUPTED = 13Defined in Media/MediaError.h:33
Snapshot data is corrupted.
CRT_NO_CARTRIDGE
static constexpr
cpp
long CRT_NO_CARTRIDGE = 20Defined in Media/MediaError.h:36
No cartridge attached.
CRT_UNKNOWN
static constexpr
cpp
long CRT_UNKNOWN = 21Defined in Media/MediaError.h:37
Unknown cartridge type.
CRT_UNSUPPORTED
static constexpr
cpp
long CRT_UNSUPPORTED = 22Defined in Media/MediaError.h:38
Unsupported cartridge type.
CRT_TOO_MANY_PACKETS
static constexpr
cpp
long CRT_TOO_MANY_PACKETS = 23Defined in Media/MediaError.h:39
CRT file contains too many Rom packets.
CRT_CORRUPTED_PACKET
static constexpr
cpp
long CRT_CORRUPTED_PACKET = 24Defined in Media/MediaError.h:40
CRT file contains a corrupted Rom package.