Improved the error handling
This commit is contained in:
@ -328,6 +328,7 @@ class ExpansionsManager:
|
||||
return possiblyValidExpansions
|
||||
|
||||
def _createExpansion(self, expansionID):
|
||||
terminalErrors = SystemExit, KeyboardInterrupt, GeneratorExit
|
||||
try:
|
||||
# Create the expansion
|
||||
expansionClass = self._getClassFillMissing(expansionID)
|
||||
@ -340,6 +341,8 @@ class ExpansionsManager:
|
||||
else:
|
||||
self._playersLookUp[player] = [expansionID]
|
||||
return expansion
|
||||
except terminalErrors as e:
|
||||
raise e
|
||||
except Exception as e:
|
||||
return e
|
||||
|
||||
|
||||
Reference in New Issue
Block a user