From b3ee4aaf4560e79f1631a7f877c9e7553358b645 Mon Sep 17 00:00:00 2001
From: "Brian S. Stephan" <bss@incorporeal.org>
Date: Tue, 17 Dec 2024 13:39:40 -0600
Subject: [PATCH] provide better feedback when we have exhausted all config_pb2
 options

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
---
 gp2040ce_bintools/__init__.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gp2040ce_bintools/__init__.py b/gp2040ce_bintools/__init__.py
index fd26b63..289cd45 100644
--- a/gp2040ce_bintools/__init__.py
+++ b/gp2040ce_bintools/__init__.py
@@ -68,7 +68,8 @@ def get_config_pb2(with_fallback: bool = args.use_shipped_fallback):
         except (ModuleNotFoundError, TypeError):
             # (TypeError could be the windows bug https://github.com/protocolbuffers/protobuf/issues/14345)
             if not with_fallback:
-                raise
+                logger.exception("no viable set of protobuf modules could be found, please use -P or -S!")
+                raise RuntimeError("no viable set of protobuf modules could be found, please use -P or -S!")
 
             # that failed, import the snapshot (may be lagging what's in GP2040-CE)
             logger.warning("using the fallback .proto files! please supply your files with -P if you can!")