Skip to content

CAMEL-23226: Standardize error output to use printErr() in camel-jbang#22163

Merged
gnodet merged 2 commits intomainfrom
CAMEL-23226-standardize-error-output
Mar 23, 2026
Merged

CAMEL-23226: Standardize error output to use printErr() in camel-jbang#22163
gnodet merged 2 commits intomainfrom
CAMEL-23226-standardize-error-output

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 21, 2026

JIRA: CAMEL-23226

Summary

Camel JBang commands used three inconsistent patterns for reporting errors to the user:

  1. printer().printErr() — the correct approach, uses the Printer abstraction with ERROR: prefix
  2. System.err.println() — bypasses Printer, no consistent prefix
  3. printer().println() — sends errors to stdout, invisible in stderr-only logs

This PR standardizes all error output to use printer().printErr():

  • Fix 14 commands across action, catalog, config, infra, plugin, update, and version packages
  • Add unit tests for ConfigGet and PluginDelete error output

Test plan

  • Verify error messages use ERROR: prefix in all fixed commands
  • Run ConfigGetTest and PluginDeleteTest unit tests

@github-actions
Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions github-actions bot added the dsl label Mar 21, 2026
@github-actions
Copy link
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-core
All tested modules (26 modules)
  • Camel :: Coverage
  • Camel :: Coverage [pom]
  • Camel :: JBang :: Core
  • Camel :: JBang :: Core [jar]
  • Camel :: JBang :: Integration tests
  • Camel :: JBang :: Integration tests [jar]
  • Camel :: JBang :: MCP
  • Camel :: JBang :: MCP [jar]
  • Camel :: JBang :: Main
  • Camel :: JBang :: Main [jar]
  • Camel :: JBang :: Plugin :: Edit
  • Camel :: JBang :: Plugin :: Edit [jar]
  • Camel :: JBang :: Plugin :: Generate
  • Camel :: JBang :: Plugin :: Generate [jar]
  • Camel :: JBang :: Plugin :: Kubernetes
  • Camel :: JBang :: Plugin :: Kubernetes [jar]
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: Route Parser [jar]
  • Camel :: JBang :: Plugin :: Testing
  • Camel :: JBang :: Plugin :: Testing [jar]
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: JBang :: Plugin :: Validate [jar]
  • Camel :: Launcher
  • Camel :: Launcher [jar]
  • Camel :: Launcher :: Container
  • Camel :: Launcher :: Container [pom]

gnodet and others added 2 commits March 23, 2026 11:17
…g commands

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- InfraRun: Add missing else to avoid printing both error messages
- Run: Keep warning as WARN (non-fatal IOException), not ERROR
- Run: Convert missed startup failure message to printErr()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet force-pushed the CAMEL-23226-standardize-error-output branch from 62ee227 to 3933312 Compare March 23, 2026 10:18
@gnodet gnodet merged commit b8ce81c into main Mar 23, 2026
5 checks passed
@gnodet gnodet deleted the CAMEL-23226-standardize-error-output branch March 23, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants