Top Description Fields Constructors Methods
org.eclipse.jgit.api.errors

public Class AbortedByHookException

extends GitAPIException
Class Inheritance
Imports
java.text.MessageFormat, org.eclipse.jgit.internal.JGitText

Exception thrown when a hook returns a process result with a value different from 0. It is up to the caller to decide whether this should block execution or not.
Since
4.0

Field Summary

Modifier and TypeField and Description
private final String
hookName

The hook that caused this exception.

private final String
hookStdErr

The stderr output of the hook.

private final int
returnCode

The process result.

private static final long

Constructor Summary

AccessConstructor and Description
public
AbortedByHookException(String
The error details from the stderr output of the hook
hookStdErr
,
String
The name of the hook that interrupted the command, must not be null.
hookName
,
int
The return code of the hook process that has been run.
returnCode
)

Constructor for AbortedByHookException

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the type of the hook that interrupted the git command.
getHookName
()

Get hook name

public String

Returns:

A string containing the complete stderr output of the hook.
getHookStdErr
()

Get the stderr output of the hook.

public int

Returns:

the hook process result.
getReturnCode
()

Get return code

Field Detail

hookNameback to summary
private final String hookName

The hook that caused this exception.

hookStdErrback to summary
private final String hookStdErr

The stderr output of the hook.

returnCodeback to summary
private final int returnCode

The process result.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.eclipse.jgit.api.errors.GitAPIException.serialVersionUID.

Constructor Detail

AbortedByHookExceptionback to summary
public AbortedByHookException(String hookStdErr, String hookName, int returnCode)

Constructor for AbortedByHookException

Parameters
hookStdErr:String

The error details from the stderr output of the hook

hookName:String

The name of the hook that interrupted the command, must not be null.

returnCode:int

The return code of the hook process that has been run.

Method Detail

getHookNameback to summary
public String getHookName()

Get hook name

Returns:String

the type of the hook that interrupted the git command.

getHookStdErrback to summary
public String getHookStdErr()

Get the stderr output of the hook.

Returns:String

A string containing the complete stderr output of the hook.

Since
5.6
getReturnCodeback to summary
public int getReturnCode()

Get return code

Returns:int

the hook process result.