We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f49eea commit fed71c1Copy full SHA for fed71c1
ue4cli/JsonDataManager.py
@@ -1,3 +1,4 @@
1
+from .UnrealManagerException import UnrealManagerException
2
from .Utility import Utility
3
import json, os, platform
4
@@ -27,7 +28,10 @@ def getDictionary(self):
27
28
Retrieves the entire data dictionary
29
"""
30
if os.path.exists(self.jsonFile):
- return json.loads(Utility.readFile(self.jsonFile))
31
+ try:
32
+ return json.loads(Utility.readFile(self.jsonFile))
33
+ except json.JSONDecodeError as err:
34
+ raise UnrealManagerException('malformed JSON configuration file "{}" ({})'.format(self.jsonFile, err))
35
else:
36
return {}
37
0 commit comments