diff --git a/LaunchScript/VirtualAcousticsStarterServer.py b/LaunchScript/VirtualAcousticsStarterServer.py index 21baed9b6bea72089b9def072980861c29d263dc..9de977503d862cdfec2181fa3911e2dbbb465303 100644 --- a/LaunchScript/VirtualAcousticsStarterServer.py +++ b/LaunchScript/VirtualAcousticsStarterServer.py @@ -17,8 +17,12 @@ class ErrorCodes(Enum): # Class representing the VA-Launcher config (.json) file class LauncherConfig: def __init__(conf, sConfigFile): - with open( sConfigFile ) as json_file: - json_config = json.load(json_file) + try: + with open( sConfigFile ) as json_file: + json_config = json.load(json_file) + except Exception as e: + print( "ERROR reading the json config:" + os.linesep + str(e) ) + sys.exit( ErrorCodes.ERROR_INCOMPLETE_CONFIG ) try: conf.dVirtualAcousticDirectories = json_config["dVAServerDirectories"]