org.marc4j.marc
Class MarcException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.marc4j.marc.MarcException
All Implemented Interfaces:
Serializable

public class MarcException
extends RuntimeException

MarcException is thrown when an error occurs while processing a record object.

Version:
$Revision: 1.5 $
Author:
Bas Peters
See Also:
Serialized Form

Constructor Summary
MarcException()
          Creates a new MarcException.
MarcException(String message)
          Creates a new MarcException with the specified message.
MarcException(String message, Throwable ex)
          Creates a new MarcException with the specified message and an underlying root cause.
 
Method Summary
 Throwable getCause()
          Return the root cause or null if there was no original exception.
 Throwable initCause(Throwable cause)
          Sets the root cause of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MarcException

public MarcException()

Creates a new MarcException.


MarcException

public MarcException(String message)

Creates a new MarcException with the specified message.

Parameters:
message - information about the cause of the exception

MarcException

public MarcException(String message,
                     Throwable ex)

Creates a new MarcException with the specified message and an underlying root cause.

Parameters:
message - information about the cause of the exception
ex - the nested exception that caused this exception
Method Detail

getCause

public Throwable getCause()

Return the root cause or null if there was no original exception.

Overrides:
getCause in class Throwable
Returns:
the root cause of this exception

initCause

public Throwable initCause(Throwable cause)

Sets the root cause of this exception. This may only be called once. Subsequent calls throw an IllegalStateException.

Overrides:
initCause in class Throwable
Parameters:
cause - the root cause of this exception
Returns:
the root cause of this exception
Throws:
IllegalStateException - if this method is called twice.


Copyright 2001-2003 Bas Peters. All Rights Reserved.