mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-01 03:00:13 -04:00
generate_headers.py prints error when JSON file cannot be loaded to localize problem
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
@@ -187,8 +187,11 @@ def combine_json(root_dir):
|
||||
path, file_name = os.path.split(file)
|
||||
fluid_name = file_name.split('.')[0]
|
||||
|
||||
# Load the fluid file
|
||||
fluid = json.load(open(file, 'r'))
|
||||
try:
|
||||
# Load the fluid file
|
||||
fluid = json.load(open(file, 'r'))
|
||||
except ValueError:
|
||||
raise ValueError('unable to decode file %s' % file)
|
||||
|
||||
master += [fluid]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user