-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update JavaDoc for MissingConfigurationException
- Loading branch information
Kalcoder
committed
Dec 15, 2019
1 parent
1ff97d6
commit bbc43e7
Showing
1 changed file
with
42 additions
and
18 deletions.
There are no files selected for viewing
60 changes: 42 additions & 18 deletions
60
src/main/java/com/github/Kalcoder/BukkitUtils/errors/MissingConfigurationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,68 @@ | ||
package com.github.Kalcoder.BukkitUtils.errors; | ||
|
||
/** Error for a missing configuration file | ||
* | ||
* @since 1.0 | ||
*/ | ||
public class MissingConfigurationException extends Exception{ | ||
|
||
import java.security.PrivilegedActionException; | ||
|
||
public class MissingConfigurationException extends Exception { | ||
/** | ||
* Constructs a new exception with {@code null} as its detail message. | ||
* The cause is not initialized, and may subsequently be initialized by a | ||
* call to {@link #initCause}. | ||
* | ||
* @since 1.0 | ||
*/ | ||
public MissingConfigurationException() { | ||
super(); | ||
} | ||
|
||
/** | ||
* @param configName The name of the missing configuration | ||
* Constructs a new exception with a detail message that includes the specified configuration. The | ||
* cause is not initialized, and may subsequently be initialized by | ||
* a call to {@link #initCause}. | ||
* | ||
* @param configurationName the detail message. The detail message is saved for | ||
* later retrieval by the {@link #getMessage()} method. | ||
* | ||
* @since 1.0 | ||
*/ | ||
public MissingConfigurationException(String configName) { | ||
super("The configuration \"" + configName + "\" was not found!"); | ||
public MissingConfigurationException(String configurationName) { | ||
super("The configuration " + configurationName + " was not found!"); | ||
} | ||
|
||
/** | ||
* @param configName The name of the missing configuration | ||
* @param cause The cause of the error | ||
* Constructs a new exception with the specified detail message and | ||
* cause. <p>Note that the detail message associated with | ||
* {@code cause} is <i>not</i> automatically incorporated in | ||
* this exception's detail message. | ||
* | ||
* @param configurationName the detail message (which is saved for later retrieval | ||
* by the {@link #getMessage()} method). | ||
* @param cause the cause (which is saved for later retrieval by the | ||
* {@link #getCause()} method). (A <tt>null</tt> value is | ||
* permitted, and indicates that the cause is nonexistent or | ||
* unknown.) | ||
* | ||
* @since 1.0 | ||
*/ | ||
public MissingConfigurationException(String configName, Throwable cause) { | ||
super("The configuration \"" + configName + "\" was not found!", cause); | ||
public MissingConfigurationException(String configurationName, Throwable cause) { | ||
super("The configuration " + configurationName + " was not found!", cause); | ||
} | ||
|
||
/** | ||
* @param cause The cause of the error | ||
* Constructs a new exception with the specified cause and a detail | ||
* message of <tt>(cause==null ? null : cause.toString())</tt> (which | ||
* typically contains the class and detail message of <tt>cause</tt>). | ||
* This constructor is useful for exceptions that are little more than | ||
* wrappers for other throwables (for example, {@link | ||
* PrivilegedActionException}). | ||
* | ||
* @param cause the cause (which is saved for later retrieval by the | ||
* {@link #getCause()} method). (A <tt>null</tt> value is | ||
* permitted, and indicates that the cause is nonexistent or | ||
* unknown.) | ||
* | ||
* @since 1.0 | ||
*/ | ||
public MissingConfigurationException(Throwable cause) { | ||
super(cause); | ||
} | ||
|
||
protected MissingConfigurationException(String configName, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { | ||
super("The configuration \"" + configName + "\" was not found!", cause, enableSuppression, writableStackTrace); | ||
} | ||
} |