001package jmri.jmrit.roster;
002
003import javax.annotation.Nonnull;
004
005import jmri.util.prefs.InitializationException;
006
007/**
008 * An exception thrown when the configured roster location is not available
009 * at startup, for example because the user removed a USB drive that holds
010 * the roster directory. Recognized by
011 * {@link jmri.implementation.JmriConfigurationManager} so that, in a
012 * non-headless application, the user can be offered Continue or Quit before
013 * the broader initialization-error dialog is shown.
014 *
015 * @author Chad Francis (C) 2026
016 */
017public class RosterLocationUnavailableException extends InitializationException {
018
019    private final String unavailablePath;
020
021    public RosterLocationUnavailableException(String message, String localized,
022            @Nonnull String unavailablePath, Throwable cause) {
023        super(message, localized, cause);
024        this.unavailablePath = unavailablePath;
025    }
026
027    @Nonnull
028    public String getUnavailablePath() {
029        return unavailablePath;
030    }
031}