diff --git a/testflows/_core/cli/arg/type.py b/testflows/_core/cli/arg/type.py index b354472..1246d6b 100644 --- a/testflows/_core/cli/arg/type.py +++ b/testflows/_core/cli/arg/type.py @@ -160,7 +160,7 @@ def repeat(value): pattern, count = fields option = Repeat(count=count, pattern=pattern, until=until) except Exception as e: - raise ArgumentTypeError(f"'{value}' is invalid") + raise ArgumentTypeError(f"'{value}' is invalid: {e}") return option def retry(value): @@ -182,7 +182,7 @@ def retry(value): backoff = 1 option = Retry(count=count, timeout=timeout, delay=delay, backoff=backoff, jitter=jitter, pattern=pattern) except Exception as e: - raise ArgumentTypeError(f"'{value}' is invalid") + raise ArgumentTypeError(f"'{value}' is invalid: {e}") return option def tags_filter(value): @@ -196,7 +196,7 @@ def tags_filter(value): type = "suite" option = (type, tuple(tags)) except Exception as e: - raise ArgumentTypeError(f"'{value}' is invalid") + raise ArgumentTypeError(f"'{value}' is invalid: {e}") return option def onoff(value): @@ -217,4 +217,4 @@ def trace_level(value): raise ArgumentTypeError(f"'{value}' is invalid") trace_level.choices = ["debug", "info", "warning", "error", "critical"] -trace_level.metavar = str(set(trace_level.choices)).replace(" ","").replace("'","") \ No newline at end of file +trace_level.metavar = str(set(trace_level.choices)).replace(" ","").replace("'","")