Class DBException

    • Field Detail

      • query

        @Nullable
        public final String query
        SQL query that occurs this problem.
      • exception

        @Nullable
        public final SQLException exception
        SQL exception that encountered during database interaction. Optional.
    • Constructor Detail

      • DBException

        public DBException​(String message,
                           @Nullable
                           String query,
                           @Nullable
                           SQLException exception)
        Trivial constructor.
        Parameters:
        message - message (what is being processed when the error encountered).
        query - the SQL query that being processed (optional).
        exception - the encountered SQL exception (optional).
      • DBException

        public DBException​(String message,
                           @Nullable
                           String query)
        Trivial constructor.
        Parameters:
        message - message (what is being processed when the error encountered).
        query - the SQL query that being processed (optional).
      • DBException

        public DBException​(String message)
        Trivial constructor.
        Parameters:
        message - message (what is being processed when the error encountered).
      • DBException

        public DBException​(String message,
                           SQLException exception)
        Trivial constructor.
        Parameters:
        message - message (what is being processed when the error encountered).
        exception - the encountered SQL exception (optional).
      • DBException

        protected DBException​(@NotNull
                              String message,
                              @Nullable
                              Throwable cause)
        Empty constructor. Just calls the base constructor.
        Parameters:
        message - exception message.
        cause - cause.
        Since:
        8.1
    • Method Detail

      • getCauseMessage

        public String getCauseMessage()
        Returns the message of #cause or an empty string if no nested exceptions.
        Returns:
        message or empty string.
      • getSqlException

        @Nullable
        public SQLException getSqlException()
        Returns a SQL exception if specified.
        Returns: