Package com.sun.jna

# Class LastErrorException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.sun.jna.LastErrorException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `Win32Exception`

public class LastErrorException extends RuntimeException
Exception representing a non-zero error code returned in either `errno` or `GetLastError()`.

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Modifier
Constructor
Description
``
`LastErrorException(int code)`
`protected`
`LastErrorException(int code, String msg)`
``
`LastErrorException(String msg)`

## Method Summary

Modifier and Type
Method
Description
`int`
`getErrorCode()`

### 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`

## Constructor Details

### LastErrorException

public LastErrorException(String msg)

### LastErrorException

public LastErrorException(int code)

### LastErrorException

protected LastErrorException(int code, String msg)

## Method Details

### getErrorCode

public int getErrorCode()

Returns:
  The reported error code