[ 
https://issues.apache.org/jira/browse/CAMEL-25389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on CAMEL-25389 stopped by Claus Ibsen.
-------------------------------------------
> camel-jbang - Exit code contract, stderr for errors, central error handling
> ---------------------------------------------------------------------------
>
>                 Key: CAMEL-25389
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25389
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-jbang
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> * Add {{CliExitCode}} constants (0,1,2,3,4,70) and {{CliException(code, 
> message)}}.
> * Install a picocli execution-exception handler and exit-code mapper in 
> {{CamelJBangMain}}: {{CliException}} prints one {{ERROR:}} line on stderr; 
> other exceptions exit 70 with stack trace on stderr; stack traces for 1/3/4 
> only with {{CAMEL_DEBUG=true}}/{{--verbose}}.
> * {{Printer}} gets an error channel ({{printErr}}, {{printWarn}}, 
> {{printTip}}) that goes to stderr; {{StringPrinter}} captures stdout and 
> stderr separately.
> * Move the ~25 {{println("Error: ...")}} sites to {{printErr}}, and non-error 
> text out of {{printErr}} (e.g. {{transform dataweave}} summary).
> * "Plugins (not installed)" banner: stderr, and suppressed without a TTY.
> * Unknown command matching a plugin name must not exit 0 after 
> auto-installing.
> * Parent commands ({{transform}}, {{eval}}, {{catalog}}, {{cmd}}, {{config}}, 
> {{infra}}, {{plugin}}, {{update}}, {{version}}, {{dependency}}) use their own 
> {{CommandLine}} so help lists subcommands and the child's exit code 
> propagates.
> * Replace {{return -1}} (exit 255) with proper codes.
> * New docs page "Exit codes and machine-readable output"; create 
> {{camel-4x-upgrade-guide-4_24.adoc}} entry.
> _Claude Code on behalf of davsclaus (Claus Ibsen)_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to