---
url: /flow/guide/scripting-reference/functions/exceptions/exceptionproc.md
---

# ExceptionProc

## Declaration

`function ExceptionProc: Cardinal;`

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
begin
try
Value := 1/0;
except
LogError('Exception occurred: ' + ExceptionToString(ExceptionType, ExceptionParam) + ' The error occurred in procedure: ' + IntToStr(ExceptionProc));
end;
end;
```

## Description

Returns an exception parameter string that is used in [ExceptionToString](/flow/guide/scripting-reference/functions/exceptions/exceptiontostring) and [RaiseException](/flow/guide/scripting-reference/functions/exceptions/raiseexception) functions.
