From a8e2c58656383f12dcee7125b8bd123bcec3428d Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 11 Dec 2024 09:31:30 -0800 Subject: [PATCH] Throw toolchain resolution error (as EvalError) instead of IllegalStateException if create_compile_action() is called for an action that isn't configured for the toolchain. PiperOrigin-RevId: 705135234 Change-Id: Iffaf819e9b59cc4925aa7bd14ce5c3f529664b1b --- .../devtools/build/lib/rules/cpp/CppCompileActionBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionBuilder.java index 6234a14b47ccdc..589cf3e406a424 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionBuilder.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionBuilder.java @@ -246,7 +246,8 @@ public CppCompileAction buildOrThrowIllegalStateException() { } } - static final class UnconfiguredActionConfigException extends Exception { + /** Exception thrown when the action is not configured in the toolchain. */ + public static final class UnconfiguredActionConfigException extends Exception { private UnconfiguredActionConfigException(String actionName) { super(String.format("Expected action_config for '%s' to be configured", actionName)); }