porymap icon indicating copy to clipboard operation
porymap copied to clipboard

Excessive error logging for parsing issues

Open GriffinRichards opened this issue 5 months ago • 0 comments

Some parsing errors result in multiple logs that don't add new information. Example for trying to open wild encounters if the file is missing:

<timestamp> [ERROR] Could not open '<path>/wild_encounters.json': No such file or directory
<timestamp> [ERROR] Error: Failed to parse json file <path>/wild_encounters.json: unexpected end of input
<timestamp>  [WARN] Failed to read wild encounters from <path>/wild_encounters.json

ParseUtil should probably expose error messages to the caller and allow them to handle the details. The example above should look something like:

<timestamp>  [WARN] Failed to read wild encounters from '<path>/wild_encounters.json': No such file or directory

GriffinRichards avatar Jan 19 '24 20:01 GriffinRichards