Package xyz.srnyx.annoyingapi.storage
Class ConnectionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- xyz.srnyx.annoyingapi.storage.ConnectionException
-
- All Implemented Interfaces:
java.io.Serializable
public class ConnectionException extends java.lang.ExceptionRepresents an exception that occurs while attempting to connect to a database- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description @NotNull java.util.PropertiespropertiesThe properties used to connect to the database
Recommended to usegetPropertiesRedacted()for logging/other outputs@NotNull java.lang.StringurlThe URL of the database connection
-
Constructor Summary
Constructors Constructor Description ConnectionException(@NotNull java.lang.String message, @NotNull java.lang.String url, @NotNull java.util.Properties properties)Constructs a new connection exception with the given message, URL, and propertiesConnectionException(@NotNull java.lang.Throwable e, @NotNull java.lang.String url, @NotNull java.util.Properties properties)Constructs a new connection exception with the given URL and properties
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.util.PropertiesgetPropertiesRedacted()Get the properties used to connect to the database, with the password redacted
-
-
-
Field Detail
-
url
@NotNull public final @NotNull java.lang.String url
The URL of the database connection
-
properties
@NotNull public final @NotNull java.util.Properties properties
The properties used to connect to the database
Recommended to usegetPropertiesRedacted()for logging/other outputs
-
-
Constructor Detail
-
ConnectionException
public ConnectionException(@NotNull @NotNull java.lang.Throwable e, @NotNull @NotNull java.lang.String url, @NotNull @NotNull java.util.Properties properties)Constructs a new connection exception with the given URL and properties- Parameters:
e- the exception that occurredurl-urlproperties-properties
-
ConnectionException
public ConnectionException(@NotNull @NotNull java.lang.String message, @NotNull @NotNull java.lang.String url, @NotNull @NotNull java.util.Properties properties)Constructs a new connection exception with the given message, URL, and properties- Parameters:
message- the message to displayurl-urlproperties-properties
-
-