Package org.eclipse.jgit.errors
Class CorruptObjectException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- org.eclipse.jgit.errors.CorruptObjectException
-
- All Implemented Interfaces:
java.io.Serializable
public class CorruptObjectException extends java.io.IOException
Exception thrown when an object cannot be read from Git.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private ObjectChecker.ErrorType
errorType
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description CorruptObjectException(java.lang.String why)
Construct a CorruptObjectException for reporting a problem not associated with a specific object id.CorruptObjectException(java.lang.String why, java.lang.Throwable cause)
Construct a CorruptObjectException for reporting a problem not associated with a specific object id.CorruptObjectException(AnyObjectId id, java.lang.String why)
Construct a CorruptObjectException for reporting a problem specified object idCorruptObjectException(ObjectChecker.ErrorType type, AnyObjectId id, java.lang.String why)
Report a specific error condition discovered in an object.CorruptObjectException(ObjectId id, java.lang.String why)
Construct a CorruptObjectException for reporting a problem specified object id
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectChecker.ErrorType
getErrorType()
Specific error condition identified byObjectChecker
.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
errorType
private ObjectChecker.ErrorType errorType
-
-
Constructor Detail
-
CorruptObjectException
public CorruptObjectException(ObjectChecker.ErrorType type, AnyObjectId id, java.lang.String why)
Report a specific error condition discovered in an object.- Parameters:
type
- type of errorid
- identity of the bad objectwhy
- description of the error.- Since:
- 4.2
-
CorruptObjectException
public CorruptObjectException(AnyObjectId id, java.lang.String why)
Construct a CorruptObjectException for reporting a problem specified object id- Parameters:
id
- aAnyObjectId
why
- error message
-
CorruptObjectException
public CorruptObjectException(ObjectId id, java.lang.String why)
Construct a CorruptObjectException for reporting a problem specified object id- Parameters:
id
- aObjectId
why
- error message
-
CorruptObjectException
public CorruptObjectException(java.lang.String why)
Construct a CorruptObjectException for reporting a problem not associated with a specific object id.- Parameters:
why
- error message
-
CorruptObjectException
public CorruptObjectException(java.lang.String why, java.lang.Throwable cause)
Construct a CorruptObjectException for reporting a problem not associated with a specific object id.- Parameters:
why
- message describing the corruption.cause
- optional root cause exception- Since:
- 3.4
-
-
Method Detail
-
getErrorType
@Nullable public ObjectChecker.ErrorType getErrorType()
Specific error condition identified byObjectChecker
.- Returns:
- error condition or null.
- Since:
- 4.2
-
-