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