This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-26788-chaos-explore-save
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/CAMEL-26788-chaos-explore-save 
by this push:
     new 06fe43b253f0 CAMEL-26788: camel-jbang - chaos-explore names an 
exception without a message by its type
06fe43b253f0 is described below

commit 06fe43b253f09350c6b8f0a653eb8e825e9c668b
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Nov 9 23:47:00 2026 +0100

    CAMEL-26788: camel-jbang - chaos-explore names an exception without a 
message by its type
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../java/org/apache/camel/dsl/jbang/core/commands/ChaosExplore.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ChaosExplore.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ChaosExplore.java
index 8d8f8c981cec..a0ee84d862be 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ChaosExplore.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ChaosExplore.java
@@ -154,7 +154,8 @@ public class ChaosExplore extends CamelCommand {
             answer = ask.doCall();
         } catch (Exception e) {
             // the LLM fails with an exit code; anything else must not cost 
the report of what was explored so far
-            printer().printErr("camel ask failed: " + e.getMessage());
+            // an exception without a message is known by its type
+            printer().printErr("camel ask failed: " + (e.getMessage() != null 
? e.getMessage() : e.getClass().getSimpleName()));
             answer = CliExitCode.FAILURE;
         } finally {
             // the AI may have finished it already; else its rules go now

Reply via email to