Commit 534b2e77 authored by Łukasz Nowak's avatar Łukasz Nowak

Emit more informative log.

parent b0e8ede0
...@@ -368,7 +368,7 @@ class RuleMixin(Predicate): ...@@ -368,7 +368,7 @@ class RuleMixin(Predicate):
else: else:
# Compensate non deletable # Compensate non deletable
raise NotImplementedError( raise NotImplementedError(
'Compensation undesired: decision_movement = %s' % ( 'Compensation undesired: decision_movement %s = %s' % (decision_movement.getPath(),
pformat(decision_movement.__dict__), )) pformat(decision_movement.__dict__), ))
new_movement = decision_movement.asContext( new_movement = decision_movement.asContext(
quantity=-decision_movement.getQuantity()) quantity=-decision_movement.getQuantity())
...@@ -416,8 +416,10 @@ class RuleMixin(Predicate): ...@@ -416,8 +416,10 @@ class RuleMixin(Predicate):
# Frozen must be compensated # Frozen must be compensated
if not _compare(profit_tester_list, prevision_movement, decision_movement): if not _compare(profit_tester_list, prevision_movement, decision_movement):
raise NotImplementedError( raise NotImplementedError(
'Compensation undesired: prevision_movement = %s decision_movement = %s' % ( 'Compensation undesired: prevision_movement %s = %s decision_movement %s = %s' % (
prevision_movement.getPath(),
pformat(prevision_movement.__dict__), pformat(prevision_movement.__dict__),
decision_movement.getPath(),
pformat(decision_movement.__dict__) )) pformat(decision_movement.__dict__) ))
new_movement = decision_movement.asContext( new_movement = decision_movement.asContext(
quantity=-decision_movement_quantity) quantity=-decision_movement_quantity)
...@@ -438,8 +440,10 @@ class RuleMixin(Predicate): ...@@ -438,8 +440,10 @@ class RuleMixin(Predicate):
# Frozen must be compensated # Frozen must be compensated
if not _compare(divergence_tester_list, prevision_movement, decision_movement): if not _compare(divergence_tester_list, prevision_movement, decision_movement):
raise NotImplementedError( raise NotImplementedError(
'Compensation undesired: prevision_movement = %s decision_movement = %s' % ( 'Compensation undesired: prevision_movement %s = %s decision_movement %s = %s' % (
prevision_movement.getPath(),
pformat(prevision_movement.__dict__), pformat(prevision_movement.__dict__),
decision_movement.getPath(),
pformat(decision_movement.__dict__) )) pformat(decision_movement.__dict__) ))
new_movement = decision_movement.asContext( new_movement = decision_movement.asContext(
quantity=-decision_movement_quantity) quantity=-decision_movement_quantity)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment