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

# ExceptionType

## Declaration

`function ExceptionType: TIFException;`

### Example

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

## Description

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