diff --git a/fixtures_utils.nim b/fixtures_utils.nim index a4b51a2..af10cd7 100644 --- a/fixtures_utils.nim +++ b/fixtures_utils.nim @@ -18,13 +18,19 @@ proc yamlToJson*(file: string): seq[JsonNode] = try: let fs = openFileStream(file) defer: fs.close() - result = fs.loadToJson() + try: + result = fs.loadToJson() + except OverflowError as e: + echo "Overflow exception when parsing. Did you stringify 18446744073709551615 (-1)?" + echo "Current file: ", file + echo "Current position: ", fs.getPosition() + var line: string + discard fs.peekLine(line) + echo "Peek at the line: ", line + raise except IOError: echo "Exception when reading file: " & file raise - except OverflowError: - echo "Overflow exception when parsing. Did you stringify 18446744073709551615 (-1)?" - raise when isMainModule: # Do not forget to stringify FAR_EPOCH_SLOT = 18446744073709551615 (-1) in the YAML file