From: Tim Vieira Date: Thu, 18 Jul 2013 17:01:19 +0000 (-0400) Subject: better error msgs. X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=df4922a940d179c3de3f7cab4afababeaf5f1baf;p=dyna2 better error msgs. --- diff --git a/src/Dyna/Backend/Python/stdlib.py b/src/Dyna/Backend/Python/stdlib.py index c6cdd30..b448afb 100644 --- a/src/Dyna/Backend/Python/stdlib.py +++ b/src/Dyna/Backend/Python/stdlib.py @@ -8,17 +8,20 @@ from glob import glob def or_(x, y): if not (isbool(x) and isbool(y)): - raise TypeError('') + raise TypeError('`|` expected Boolean arguments, got `%s` and `%s`' \ + % (type(x).__name__, type(y).__name__)) return todyna(x or y) def and_(x, y): if not (isbool(x) and isbool(y)): - raise TypeError('') + raise TypeError('`&` expected Boolean arguments, got `%s` and `%s`' \ + % (type(x).__name__, type(y).__name__)) return todyna(x and y) def not_(x): if not isbool(x): - raise TypeError(repr(x)) + raise TypeError('`!` expected Boolean arguments, got `%s`' \ + % type(x).__name__) if x: return false else: