Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions JsonPreprocessor/CJsonPreprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,8 @@ def __handleListElements(sInput : str) -> str:
try:
sJsonData= self.__load_and_removeComments(os.path.abspath(jFile))
except Exception as reason:
if masterFile:
self.__reset()
raise Exception(f"Could not read json file '{jFile}' due to: '{reason}'!")

sJsonDataUpdated = ""
Expand Down Expand Up @@ -775,6 +777,8 @@ def __handleListElements(sInput : str) -> str:
cls=CJSONDecoder,
object_pairs_hook=self.__processImportFiles)
except Exception as error:
if masterFile:
self.__reset()
raise Exception(f"json file '{jFile}': '{error}'")

oJson = __handleStrNoneTrueFalse(oJson)
Expand Down Expand Up @@ -812,6 +816,7 @@ def __handleListElements(sInput : str) -> str:
ldict = {}
exec(sExec, globals(), ldict)
except:
self.__reset()
raise Exception(f"The variable '{parseNestedParam[0]}' is not available!")

self.__reset()
Expand Down