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

public Class CorruptObjectException

extends IOException
Class Inheritance
Imports
java.io.IOException, java.text.MessageFormat, org.eclipse.jgit.annotations.Nullable, org.eclipse.jgit.internal.JGitText, org.eclipse.jgit.lib.AnyObjectId, .ObjectChecker, .ObjectId

Exception thrown when an object cannot be read from Git.

Field Summary

Modifier and TypeField and Description
private ObjectChecker.ErrorType
private static final long

Constructor Summary

AccessConstructor and Description
public
CorruptObjectException(ObjectChecker.ErrorType
type of error
type
,
AnyObjectId
identity of the bad object
id
,
String
description of the error.
why
)

Report a specific error condition discovered in an object.

public
CorruptObjectException(AnyObjectId id, String
error message
why
)

Construct a CorruptObjectException for reporting a problem specified object id

public
CorruptObjectException(ObjectId id, String
error message
why
)

Construct a CorruptObjectException for reporting a problem specified object id

public
CorruptObjectException(String
error message
why
)

Construct a CorruptObjectException for reporting a problem not associated with a specific object id.

public
CorruptObjectException(String
message describing the corruption.
why
,
Throwable
optional root cause exception
cause
)

Construct a CorruptObjectException for reporting a problem not associated with a specific object id.

Method Summary

Modifier and TypeMethod and Description
public ObjectChecker.ErrorType

Returns:

error condition or null.
getErrorType
()

Specific error condition identified by org.eclipse.jgit.lib.ObjectChecker.

Field Detail

errorTypeback to summary
private ObjectChecker.ErrorType errorType
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.io.IOException.serialVersionUID.

Constructor Detail

CorruptObjectExceptionback to summary
public CorruptObjectException(ObjectChecker.ErrorType type, AnyObjectId id, String why)

Report a specific error condition discovered in an object.

Parameters
type:ObjectChecker.ErrorType

type of error

id:AnyObjectId

identity of the bad object

why:String

description of the error.

Since
4.2
CorruptObjectExceptionback to summary
public CorruptObjectException(AnyObjectId id, String why)

Construct a CorruptObjectException for reporting a problem specified object id

Parameters
id:AnyObjectId

a org.eclipse.jgit.lib.AnyObjectId

why:String

error message

CorruptObjectExceptionback to summary
public CorruptObjectException(ObjectId id, String why)

Construct a CorruptObjectException for reporting a problem specified object id

Parameters
id:ObjectId

a org.eclipse.jgit.lib.ObjectId

why:String

error message

CorruptObjectExceptionback to summary
public CorruptObjectException(String why)

Construct a CorruptObjectException for reporting a problem not associated with a specific object id.

Parameters
why:String

error message

CorruptObjectExceptionback to summary
public CorruptObjectException(String why, Throwable cause)

Construct a CorruptObjectException for reporting a problem not associated with a specific object id.

Parameters
why:String

message describing the corruption.

cause:Throwable

optional root cause exception

Since
3.4

Method Detail

getErrorTypeback to summary
public ObjectChecker.ErrorType getErrorType()

Specific error condition identified by org.eclipse.jgit.lib.ObjectChecker.

Returns:ObjectChecker.ErrorType

error condition or null.

Annotations
@Nullable
Since
4.2