Package ai.wanaku.cli.main.support
Class WanakuExceptionHandler
java.lang.Object
ai.wanaku.cli.main.support.WanakuExceptionHandler
- All Implemented Interfaces:
picocli.CommandLine.IExecutionExceptionHandler
public class WanakuExceptionHandler
extends Object
implements picocli.CommandLine.IExecutionExceptionHandler
Centralized exception handler for the Wanaku CLI.
This handler provides user-friendly error messages for common exceptions that occur
during command execution, replacing verbose stack traces with actionable error information.
It implements Picocli's CommandLine.IExecutionExceptionHandler interface to intercept exceptions
before they reach the user.
Supported exception types:
ConnectException- Connection refused or service unreachableUnknownHostException- DNS resolution failuresSocketTimeoutException- Request timeoutsWebApplicationException- HTTP error responsesProcessingException- REST client processing errors
The handler can operate in two modes:
- Normal mode: Displays concise, user-friendly error messages
- Verbose mode: Shows full stack traces for debugging
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninthandleExecutionException(Exception ex, picocli.CommandLine commandLine, picocli.CommandLine.ParseResult parseResult)
-
Constructor Details
-
WanakuExceptionHandler
public WanakuExceptionHandler()
-
-
Method Details