From df4922a940d179c3de3f7cab4afababeaf5f1baf Mon Sep 17 00:00:00 2001 From: Tim Vieira Date: Thu, 18 Jul 2013 13:01:19 -0400 Subject: [PATCH] better error msgs. --- src/Dyna/Backend/Python/stdlib.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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: -- 2.50.1