From 0690ed3a08bccd50d114ead1c257e81a7fa231b7 Mon Sep 17 00:00:00 2001 From: Matt Jones <47545907+SoundMatt@users.noreply.github.com> Date: Fri, 22 May 2026 10:43:28 -0700 Subject: [PATCH] fix(protobuf_lark): add missing raise keyword for multiple-package error `process_lark_tree` called `Exception(...)` without `raise`, so the exception object was created and immediately discarded. Files with multiple package statements would silently continue processing instead of failing. Add `raise`. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com> --- ifex/models/protobuf/protobuf_lark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ifex/models/protobuf/protobuf_lark.py b/ifex/models/protobuf/protobuf_lark.py index a83c559..6092367 100644 --- a/ifex/models/protobuf/protobuf_lark.py +++ b/ifex/models/protobuf/protobuf_lark.py @@ -648,7 +648,7 @@ def process_lark_tree(root): packages = get_items_of_type(root, 'package') if len(packages) > 1: - Exception("Multiple package statements found! The protobuf spec is ambiguous on multiple package statements (EBNF grammar allows multiple but the explanation suggests a singular use). This implementation chose to support only one per file. (If multiple are needed, please contact the IFEX project)") + raise Exception("Multiple package statements found! The protobuf spec is ambiguous on multiple package statements (EBNF grammar allows multiple but the explanation suggests a singular use). This implementation chose to support only one per file. (If multiple are needed, please contact the IFEX project)") ast_package = None if len(packages) > 0: ast_package = process_package(packages[0])