org.marc4j
Class MarcReaderException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.marc4j.MarcReaderException
- All Implemented Interfaces:
- Serializable
- public class MarcReaderException
- extends Exception
A MarcReaderException thrown when an error occurs
while parsing MARC records.
- Version:
- $Revision: 1.4 $
- Author:
- Bas Peters
- See Also:
- Serialized Form
MarcReaderException
public MarcReaderException(String message,
int pos)
Creates an Exception indicating that an error
occured while parsing MARC records.
- Parameters:
message - the reason why the exception is thrownpos - position in the character stream where the exception is thrown
MarcReaderException
public MarcReaderException(String message,
Throwable ex)
Creates a new MarcReaderException with the
specified message and an underlying root cause.
- Parameters:
message - information about the cause of the exceptionex - the nested exception that caused this exception
MarcReaderException
public MarcReaderException(String message,
int pos,
String controlNumber)
Creates an Exception indicating that an error
occured while parsing MARC records.
- Parameters:
message - the reason why the exception is thrownpos - position in the character stream where the exception is throwncontrolNumber - the control number (tag 001)
MarcReaderException
public MarcReaderException(String message,
String fileName,
int pos,
String controlNumber)
Creates an Exception indicating that an error
occured while parsing MARC records.
- Parameters:
fileName - the name of the input filemessage - the reason why the exception is thrownpos - position in the character stream where the exception is throwncontrolNumber - the control number (tag 001)
initCause
public Throwable initCause(Throwable cause)
Sets the root cause of this exception. This may
only be called once. Subsequent calls throw an
IllegalStateException.
- Parameters:
cause - the root cause of this exception
- Returns:
- the root cause of this exception
- Throws:
IllegalStateException - if this method is called twice.
getFileName
public String getFileName()
Returns the file name or null if there is no input file.
- Returns:
String - the file name
getPosition
public int getPosition()
Returns the position in the character stream where the exception is thrown.
- Returns:
int - the position
getControlNumber
public String getControlNumber()
Returns the control number (tag 001).
- Returns:
String - the control number
Copyright © 2001-2004 Bas Peters. All Rights Reserved.