51 #define IFS_ERROR_MAP(XX) \
52 XX(Success, "Success") \
53 XX(NoFileSystem, "File system has not been set") \
54 XX(NoPartition, "Partition not found / undefined") \
55 XX(BadPartition, "Partition is not valid for this filesystem") \
56 XX(BadVolumeIndex, "Volume index is invalid") \
57 XX(NotMounted, "File system is not mounted") \
58 XX(BadObject, "Malformed filesystem object") \
59 XX(BadFileSystem, "File system corruption detected") \
60 XX(BadParam, "Invalid parameter(s)") \
61 XX(NotImplemented, "File system or method not yet implemented") \
62 XX(NotSupported, "Parameter value not supported") \
63 XX(NoMem, "Memory allocation failed") \
64 XX(NameTooLong, "File name or path is too long for buffer") \
65 XX(BufferTooSmall, "Data is too long for buffer") \
66 XX(NotFound, "Object not found") \
67 XX(Exists, "File/directory exists") \
68 XX(ReadOnly, "Media is read-only") \
69 XX(ReadFailure, "Media read failed") \
70 XX(WriteFailure, "Media write failed") \
71 XX(EraseFailure, "Media erase failed") \
72 XX(InvalidHandle, "File handle is outside valid range") \
73 XX(EndOfObjects, "Last object in filing system has been read") \
74 XX(FileNotOpen, "File handle is valid but the file is not open") \
75 XX(SeekBounds, "seek would give an invalid file offset") \
76 XX(NoMoreFiles, "readdir has no more files to return") \
77 XX(OutOfFileDescs, "Cannot open another file until one is closed") \
78 XX(Denied, "Operation denied") \
79 XX(NoSpace, "No free space") \
80 XX(TooBig, "File size too big")
83 #define XX(tag, text) tag,
90 #define XX(tag, text) constexpr int tag{-int(Value::tag)};
117 return (syscode < 0) ?
SYSTEM + syscode : syscode;
The String class.
Definition: WString.h:137
#define IFS_ERROR_MAP(XX)
IFS return codes.
Definition: Components/IFS/src/include/IFS/Error.h:51
int ErrorCode
Definition: Components/IFS/src/include/IFS/Error.h:35
String toString(int err)
get text for an error code
int fromSystem(int syscode)
Translate system error code into IFS error code.
Definition: Components/IFS/src/include/IFS/Error.h:115
int toSystem(int err)
Translate IFS error code into SYSTEM code.
Definition: Components/IFS/src/include/IFS/Error.h:123
constexpr ErrorCode FS_OK
Definition: Components/IFS/src/include/IFS/Error.h:130
Value
Definition: Components/IFS/src/include/IFS/Error.h:82
bool isSystem(int err)
Determine if the given IFS error code is system-specific.
Definition: Components/IFS/src/include/IFS/Error.h:107
constexpr ErrorCode USER
Definition: Components/IFS/src/include/IFS/Error.h:94
constexpr ErrorCode SYSTEM
Definition: Components/IFS/src/include/IFS/Error.h:95
Definition: DirectoryTemplate.h:37
Error
Definition: Libraries/DiskStorage/src/include/Storage/Disk/Error.h:37