Module com.microsoft.sqlserver.jdbc
Package com.microsoft.sqlserver.jdbc

## Class SQLServerWarning

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.sql.SQLException
      - - java.sql.SQLWarning
        - - com.microsoft.sqlserver.jdbc.SQLServerWarning

All Implemented Interfaces:
  `Serializable`, `Iterable<Throwable>`

    public class SQLServerWarning
    extends SQLWarning

Holds information about SQL Server messages that is considered as Informational Messages (normally if SQL Server Severity is at 10)

Instead of just holding the SQL Server message (like a normal SQLWarning, it also holds all the SQL Servers extended information, like: ErrorSeverity, ServerName, ProcName etc

This enables client to print out extra information about the message.
Like: In what procedure was the message produced.

See Also:
  Serialized Form

### Constructor Summary

Constructors
`SQLServerWarning​(SQLServerError sqlServerError)`

### Method Summary

All Methods Instance Methods Concrete Methods
`SQLServerError` `getSQLServerError()` Returns SQLServerError object containing detailed info about exception as received from SQL Server.

### Methods inherited from class java.sql.SQLWarning

`getNextWarning, setNextWarning`

### Methods inherited from class java.sql.SQLException

`getErrorCode, getNextException, getSQLState, iterator, setNextException`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Constructor Detail

#### SQLServerWarning

    public SQLServerWarning​(SQLServerError sqlServerError)

### Method Detail

#### getSQLServerError

    public SQLServerError getSQLServerError()

Returns SQLServerError object containing detailed info about exception as received from SQL Server. This API returns null if no server error has occurred.

Returns:
  SQLServerError