1
0
Fork 0
forked from suyu/suyu

loader: Add KIP and INI file parser-specific errors

This commit is contained in:
Zach Hilman 2019-06-05 00:21:44 -04:00
parent c3548967b1
commit a76bd49268
2 changed files with 9 additions and 1 deletions

View file

@ -93,7 +93,7 @@ std::string GetFileTypeString(FileType type) {
return "unknown"; return "unknown";
} }
constexpr std::array<const char*, 62> RESULT_MESSAGES{ constexpr std::array<const char*, 66> RESULT_MESSAGES{
"The operation completed successfully.", "The operation completed successfully.",
"The loader requested to load is already loaded.", "The loader requested to load is already loaded.",
"The operation is not implemented.", "The operation is not implemented.",
@ -156,6 +156,10 @@ constexpr std::array<const char*, 62> RESULT_MESSAGES{
"The BKTR-type NCA has a bad Subsection bucket.", "The BKTR-type NCA has a bad Subsection bucket.",
"The BKTR-type NCA is missing the base RomFS.", "The BKTR-type NCA is missing the base RomFS.",
"The NSP or XCI does not contain an update in addition to the base game.", "The NSP or XCI does not contain an update in addition to the base game.",
"The KIP file has a bad header.",
"The KIP BLZ decompression of the section failed unexpectedly.",
"The INI file has a bad header.",
"The INI file contains more than the maximum allowable number of KIP files.",
}; };
std::ostream& operator<<(std::ostream& os, ResultStatus status) { std::ostream& operator<<(std::ostream& os, ResultStatus status) {

View file

@ -124,6 +124,10 @@ enum class ResultStatus : u16 {
ErrorBadSubsectionBuckets, ErrorBadSubsectionBuckets,
ErrorMissingBKTRBaseRomFS, ErrorMissingBKTRBaseRomFS,
ErrorNoPackedUpdate, ErrorNoPackedUpdate,
ErrorBadKIPHeader,
ErrorBLZDecompressionFailed,
ErrorBadINIHeader,
ErrorINITooManyKIPs,
}; };
std::ostream& operator<<(std::ostream& os, ResultStatus status); std::ostream& operator<<(std::ostream& os, ResultStatus status);