Verified Owner
Top Fields Constructors Methods
org.jabref.toolkit.exception

public Class CliExceptionHandler

extends Object
implements IExecutionExceptionHandler
Class Inheritance
All Implemented Interfaces
picocli.CommandLine.IExecutionExceptionHandler
Annotations
@NullMarked
Imports
org.jabref.logic.JabRefException, org.jspecify.annotations.NullMarked, picocli.CommandLine

Field Summary

Modifier and TypeField and Description
private final CommandLine.IExecutionExceptionHandler

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static String
public int
handleExecutionException(Exception ex, CommandLine commandLine, CommandLine.ParseResult parseResult)

Implements picocli.CommandLine.IExecutionExceptionHandler.handleExecutionException.

Handles an Exception that occurred while executing the Runnable or Callable command and returns an exit code suitable for returning from execute(String...).

private static void
printErrorMessage(Exception ex, boolean withCauseIfPresent)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final CommandLine.IExecutionExceptionHandler delegate

Constructor Detail

CliExceptionHandlerback to summary
public CliExceptionHandler(CommandLine.IExecutionExceptionHandler delegate)

Method Detail

buildCauseSuffixback to summary
private static String buildCauseSuffix(Throwable cause)
handleExecutionExceptionback to summary
public int handleExecutionException(Exception ex, CommandLine commandLine, CommandLine.ParseResult parseResult) throws Exception

Implements picocli.CommandLine.IExecutionExceptionHandler.handleExecutionException.

Doc from picocli.CommandLine.IExecutionExceptionHandler.handleExecutionException.

Handles an Exception that occurred while executing the Runnable or Callable command and returns an exit code suitable for returning from execute(String...).

Annotations
@Override
printErrorMessageback to summary
private static void printErrorMessage(Exception ex, boolean withCauseIfPresent)