Package com.microsoft.sqlserver.jdbc

# Class SQLServerError

java.lang.Object
com.microsoft.sqlserver.jdbc.SQLServerError

All Implemented Interfaces:
  `java.io.Serializable`

    public final class SQLServerError
    extends java.lang.Object
    implements java.io.Serializable

SQLServerError represents a TDS error or message event.

See Also:
  Serialized Form

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`java.lang.String` | `getErrorMessage()` | Returns error message as received from SQL Server
`int` | `getErrorNumber()` | Returns error number as received from SQL Server
`int` | `getErrorSeverity()` | Returns Severity of error (as int value) as received from SQL Server
`int` | `getErrorState()` | Returns error state as received from SQL Server
`long` | `getLineNumber()` | Returns line number where the error occurred in Stored Procedure returned by `getProcedureName()` as received from SQL Server
`java.lang.String` | `getProcedureName()` | Returns name of the stored procedure where exception occurs as received from SQL Server
`java.lang.String` | `getServerName()` | Returns name of the server where exception occurs as received from SQL Server

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

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

## Method Details

### getErrorMessage

public java.lang.String getErrorMessage()
Returns error message as received from SQL Server

Returns:
  Error Message

### getErrorNumber

public int getErrorNumber()
Returns error number as received from SQL Server

Returns:
  Error Number

### getErrorState

public int getErrorState()
Returns error state as received from SQL Server

Returns:
  Error State

### getErrorSeverity

public int getErrorSeverity()
Returns Severity of error (as int value) as received from SQL Server

Returns:
  Error Severity

### getServerName

public java.lang.String getServerName()
Returns name of the server where exception occurs as received from SQL Server

Returns:
  Server Name

### getProcedureName

public java.lang.String getProcedureName()
Returns name of the stored procedure where exception occurs as received from SQL Server

Returns:
  Procedure Name

### getLineNumber

public long getLineNumber()
Returns line number where the error occurred in Stored Procedure returned by `getProcedureName()` as received from SQL Server

Returns:
  Line Number