package de.gecheckt.pdf.umbenenner.application.port.out;

/**
 * Exception thrown when the run lock cannot be acquired.
 * <p>
 * This indicates that another instance of the PDF Umbenenner is already running
 * and holding the exclusive lock. The current instance should terminate immediately
 * and allow the running instance to complete.
 * <p>
 * This is a controlled failure mode, not a programming error. Applications should
 * catch this exception and exit gracefully with the appropriate exit code.
 *
 */
public class RunLockUnavailableException extends RuntimeException {

    private static final long serialVersionUID = -6696023481584876000L;

	/**
     * Creates a new RunLockUnavailableException with the given message.
     *
     * @param message description of why the lock could not be acquired
     */
    public RunLockUnavailableException(String message) {
        super(message);
    }

    /**
     * Creates a new RunLockUnavailableException with the given message and cause.
     *
     * @param message description of why the lock could not be acquired
     * @param cause the underlying exception that prevented lock acquisition
     */
    public RunLockUnavailableException(String message, Throwable cause) {
        super(message, cause);
    }
}
