Files
jak-project/.github/scripts/releases/error-code-metadata.json
T
Shalen Bennett 20304715af Replace assert with user-friendly error if ISO is invalid or not found (#1540)
* Replace assert with user-friendly error if ISO not found

When the extractor runs and can't detect a game folder, it will assume there is an ISO file in the directory instead. If there isn't an ISO file, or it's a different extension, it will trigger an assert. This adds an additional check to make sure the file extension is of type `.iso` and returns a more clear message to the user.

Once I get home I'll iterate upon this a bit to add file size checks and reading header data as well as making sure the error code is able to be reported to the launcher.

* Fix `extension` call & formatting

more de-rust lol

* fix extension call (again)

* fix ONE extra parenthesis

* argument incompatible with fmt print

will fix print later

* add ONE missing parenthesis 

never taking intellisense for granted again

* Add ISO size checks and rework type check

* actually print `data_dir_path` :p

* Normalize extension case before verifying file type

+ clang-format

* clang-format

Co-authored-by: doctashay <doctashay@github.com>
2022-06-24 18:27:57 -04:00

30 lines
817 B
JSON

{
"4000": {
"msg": "Validation Failed: Cannot locate ELF"
},
"4001": {
"msg": "Validation Failed: Game serial missing from valid game database"
},
"4002": {
"msg": "Validation Failed: ELF missing from valid game database"
},
"4010": {
"msg": "Validation Failed: Bad or unexpected ISO contents"
},
"4011": {
"msg": "Validation Failed: Extracted an unexpected amount of files from ISO"
},
"4020": {
"msg": "Validation Failed: ISO Extraction failed, output directory did not contain expected files"
},
"4030": {
"msg": "Decompilation Failed: An error occurred"
}
"4040": {
"msg": "Extraction Failed: Provided game data file was not an ISO file"
}
"4041": {
"msg": "Extraction Failed: Provided game data file was corrupt or has unexpected size"
}
}