Doc(Compute/typing): Make ComputeError and TypingError more clear

This commit is contained in:
Bertrand Benjamin 2018-10-10 10:46:58 +02:00
parent d2f67a0961
commit 9d5b441402
2 changed files with 3 additions and 3 deletions

View File

@ -50,12 +50,12 @@ def compute(node, left_v, right_v):
>>> compute("~", MOnumber(1), MOnumber(2))
Traceback (most recent call last):
...
mapytex.calculus.core.compute.exceptions.ComputeError: Unknown operation (~)
mapytex.calculus.core.compute.exceptions.ComputeError: Unknown operation (~) in compute
"""
try:
operation = OPERATIONS[node]
except KeyError:
raise ComputeError(f"Unknown operation ({node})")
raise ComputeError(f"Unknown operation ({node}) in compute")
return operation(left_v, right_v)

View File

@ -45,7 +45,7 @@ def typing(node, left_v, right_v):
try:
operation = OPERATIONS[node]
except KeyError:
raise TypingError(f"Unknown operation ({node})")
raise TypingError(f"Unknown operation ({node}) in typing")
return operation(left_v, right_v)
def typing_capacities(node):