From aa9af61cbeca4c38ffdd1f454d2a7456aa2d1dac Mon Sep 17 00:00:00 2001 From: Gilles Boccon-Gibod Date: Mon, 20 Mar 2023 12:14:28 -0700 Subject: [PATCH] improve exception messages --- bumble/snoop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bumble/snoop.py b/bumble/snoop.py index 462e923a..4b331d29 100644 --- a/bumble/snoop.py +++ b/bumble/snoop.py @@ -144,7 +144,7 @@ def create_snooper(spec: str) -> Generator[Snooper, None, None]: if snooper_type == 'btsnoop': if ':' not in snooper_args: - raise ValueError('I/O type for btsnoop type missing') + raise ValueError('I/O type for btsnoop snooper type missing') io_type, io_name = snooper_args.split(':', maxsplit=1) if io_type == 'file': @@ -165,6 +165,6 @@ def create_snooper(spec: str) -> Generator[Snooper, None, None]: _SNOOPER_INSTANCE_COUNT -= 1 return - raise ValueError('I/O type not supported') + raise ValueError(f'I/O type {io_type} not supported') raise ValueError(f'snooper type {snooper_type} not found')