mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 10:58:21 +08:00
Add: Added option to enable or disable some exceptions
-ALAS will withdraw from the map when it occurs instead of stopping
This commit is contained in:
@@ -87,8 +87,12 @@ class CampaignBase(Map):
|
||||
|
||||
result = func()
|
||||
if not result:
|
||||
logger.warning('No combat executed.')
|
||||
raise ScriptError('No combat executed.')
|
||||
logger.warning('ScriptError, No combat executed.')
|
||||
if self.config.ENABLE_EXCEPTION:
|
||||
raise ScriptError('No combat executed.')
|
||||
else:
|
||||
logger.warning('ScriptError, Withdrawing because enable_exception = no')
|
||||
self.withdraw()
|
||||
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user