FileDocCategorySizeDatePackage
LockException.javaAPI DocExample837Sat Feb 01 06:59:26 GMT 1997imaginary.persist

LockException.java

/**
 * This exception gets thrown whenever a method
 * encounters lock conflicts or network failures that
 * cause a lock to fail.
 */
package imaginary.persist;

public class LockException extends Exception {
    /**
     * Constructs a new lock exception with no reason.
     */
    public LockException() {
        this("An exception for no reason whatsoever.");
    }

    /**
     * Constructs a lock exception for the reason specified.
     * @param reason the reason for the exception
     */
    public LockException(String reason) {
        super(reason);
    }

    /**
     * Constructs a lock exception caused by another exception.
     * @param e the cause of the exception
     */
    public LockException(Exception e) {
        this("A lock exception caused by: " + e.getMessage());
    }
}