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:
|
def execute_batch_commands(name: str, cs: ChangeSet) -> ChangeSet:
|
||||||
result = ChangeSet()
|
result = ChangeSet()
|
||||||
|
|
||||||
|
todo = {}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for op in cs.operations:
|
for op in cs.operations:
|
||||||
|
todo = op
|
||||||
operation = op['operation']
|
operation = op['operation']
|
||||||
if operation == API_ADD:
|
if operation == API_ADD:
|
||||||
result.merge(execute_add_command(name, ChangeSet(op)))
|
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:
|
elif operation == API_DELETE:
|
||||||
result.merge(execute_delete_command(name, ChangeSet(op)))
|
result.merge(execute_delete_command(name, ChangeSet(op)))
|
||||||
except:
|
except:
|
||||||
|
print(f'ERROR: Fail to execute {todo}!')
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user