From 2baff91e9f1394c7785ca9f745d4759e3ecd43de Mon Sep 17 00:00:00 2001 From: Sean Breckenridge Date: Sun, 2 Jun 2024 17:32:26 -0700 Subject: [PATCH] better error messages --- my/smscalls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/my/smscalls.py b/my/smscalls.py index 7a8a2ed..2262f65 100644 --- a/my/smscalls.py +++ b/my/smscalls.py @@ -243,7 +243,7 @@ def _extract_mms(path: Path) -> Iterator[Res[MMS]]: yield RuntimeError(f'Missing one or more required attributes [address, type] in {addr_str}') continue if not user_type.isdigit(): - yield RuntimeError(f'Invalid string {user_type} {type(user_type)}, cannot convert to number') + yield RuntimeError(f'Invalid address type {user_type} {type(user_type)}, cannot convert to number') continue addresses.append((user_address, int(user_type))) @@ -270,7 +270,7 @@ def _extract_mms(path: Path) -> Iterator[Res[MMS]]: continue if seq is None or not seq.isdigit(): - yield RuntimeError(f'seq must be a number, was seq={seq} in {part_data}') + yield RuntimeError(f'seq must be a number, was seq={seq} {type(seq)} in {part_data}') continue charset_type: Optional[str] = _resolve_null_str(part_data.get('ct'))