<div class="meta" robots="noindex">

</div>

Property

# IPCSocket.LastErrorCode

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `IPCSocket.Error<ipcsocket.error>` as a replacement.

</div>

## Description

The last error code.

## Notes

To determine which error occurred, check the value of <span class="title-ref">LastErrorCode</span> against the following codes:\<br \>

| Value | Description                |
|-------|----------------------------|
| 100   | OpenDriverError\<br \>     |
| 102   | LostConnection\<br \>      |
| 103   | NameResolutionError\<br \> |
| 105   | AddressInUseError\<br \>   |
| 106   | InvalidStateError\<br \>   |
| 107   | InvalidPortError\<br \>    |
| 108   | OutOfMemoryError           |

## Sample code

The following example is in the Error event handler of an IPCSocket. It adds the last error code to a `ListBox</api/deprecated/listbox>`.

``` xojo
ListBox1.AddRow("Error: " + Str(Me.LastErrorCode))
```

## Compatibility

All project types on all supported operating systems.
