Enum FriendlyException.Severity
- java.lang.Object
-
- java.lang.Enum<FriendlyException.Severity>
-
- com.sedmelluq.discord.lavaplayer.tools.FriendlyException.Severity
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<FriendlyException.Severity>
- Enclosing class:
- FriendlyException
public static enum FriendlyException.Severity extends java.lang.Enum<FriendlyException.Severity>
Severity levels for FriendlyException
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMMONThe cause is known and expected, indicates that there is nothing wrong with the library itself.FAULTIf the probable cause is an issue with the library or when there is no way to tell what the cause might be.SUSPICIOUSThe cause might not be exactly known, but is possibly caused by outside factors.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FriendlyException.SeverityvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static FriendlyException.Severity[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
COMMON
public static final FriendlyException.Severity COMMON
The cause is known and expected, indicates that there is nothing wrong with the library itself.
-
SUSPICIOUS
public static final FriendlyException.Severity SUSPICIOUS
The cause might not be exactly known, but is possibly caused by outside factors. For example when an outside service responds in a format that we do not expect.
-
FAULT
public static final FriendlyException.Severity FAULT
If the probable cause is an issue with the library or when there is no way to tell what the cause might be. This is the default level and other levels are used in cases where the thrower has more in-depth knowledge about the error.
-
-
Method Detail
-
values
public static FriendlyException.Severity[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FriendlyException.Severity c : FriendlyException.Severity.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FriendlyException.Severity valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-