Class ConnectionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
xyz.srnyx.annoyingapi.storage.ConnectionException
All Implemented Interfaces:
Serializable

public class ConnectionException extends Exception
Represents an exception that occurs while attempting to connect to a database
See Also:
  • Field Details

    • url

      @NotNull public final @NotNull String url
      The URL of the database connection
    • properties

      @NotNull public final @NotNull Properties properties
      The properties used to connect to the database
      Recommended to use getPropertiesRedacted() for logging/other outputs
  • Constructor Details

    • ConnectionException

      public ConnectionException(@NotNull @NotNull Throwable e, @NotNull @NotNull String url, @NotNull @NotNull Properties properties)
      Constructs a new connection exception with the given URL and properties
      Parameters:
      e - the exception that occurred
      url - url
      properties - properties
    • ConnectionException

      public ConnectionException(@NotNull @NotNull String message, @NotNull @NotNull String url, @NotNull @NotNull Properties properties)
      Constructs a new connection exception with the given message, URL, and properties
      Parameters:
      message - the message to display
      url - url
      properties - properties
  • Method Details

    • getPropertiesRedacted

      @NotNull public @NotNull Properties getPropertiesRedacted()
      Get the properties used to connect to the database, with the password redacted
      Returns:
      the redacted properties