﻿---
sidebar_position: 8
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Get last error
 Gets information about the last error in the connection



`Function GetLastError(Val Connection) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Connection | --tcp | Arbitrary | &#x2714; | Connection, see. CreateConnection |

  
  Returns:  Map Of KeyAndValue, Undefined - Error information or undefined if there is no error

<br/>




```bsl title="1C:Enterprise/OneScript code example"

```
 




