Add error log
This commit is contained in:
@@ -271,8 +271,11 @@ def execute_delete_command(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
def execute_batch_commands(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
result = ChangeSet()
|
||||
|
||||
todo = {}
|
||||
|
||||
try:
|
||||
for op in cs.operations:
|
||||
todo = op
|
||||
operation = op['operation']
|
||||
if operation == API_ADD:
|
||||
result.merge(execute_add_command(name, ChangeSet(op)))
|
||||
@@ -281,6 +284,7 @@ def execute_batch_commands(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
elif operation == API_DELETE:
|
||||
result.merge(execute_delete_command(name, ChangeSet(op)))
|
||||
except:
|
||||
print(f'ERROR: Fail to execute {todo}!')
|
||||
pass
|
||||
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user