# ERR Last System-Detected Error Value

> Source: https://manual.pvxplus.com/variables/err

***Numeric System Variable***

## Contents

Integer, last system-detected error code

## Description

The **ERR** variable contains a numeric value (integer) that indicates the last system-detected error. It is reset by the **BEGIN**, **CLEAR**, **END**, **RESET**, **STOP** and **START** directives.

## See Also

**[ERR( ) Test Error Value](https://manual.pvxplus.com/functions/err)  
[Error Codes and Messages](https://manual.pvxplus.com/appendix/list-of-messages)  
[BEGIN Reset Files and Variables](https://manual.pvxplus.com/directives/begin)**  
**[CLEAR Reset Variables](https://manual.pvxplus.com/directives/clear)**  
**[END Halt Execution of Program](https://manual.pvxplus.com/directives/end)**  
**[RESET Reset Program State](https://manual.pvxplus.com/directives/reset)**  
**[STOP Halt Program Execution](https://manual.pvxplus.com/directives/stop)**  
**[START Restart Session](https://manual.pvxplus.com/directives/start)**

## Example

In this example, the "TEST" file is already open:

```
open (5)"TEST"
Error #14: Invalid I/O request for file state

?err
14
```
