---
title: "lastExceptionClass"
canonical: "https://support.appfire.com/space/PSJ/15483414/lastExceptionClass"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | lastExceptionClass() | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Returns the class of a Java class exception when an error is thrown.

## Return Type

**String**

## Example

```
try {
	runAs("user_that_does_not_exist");
} catch string err {
	// will not catch error here
} catch {
	runnerLog("Class:" + lastExceptionClass());
    runnerLog("Message:" + lastExceptionMessage());
}
```

## Example Output

![image](media://e012c234-306c-4827-a1d8-569372bc7a1b)


## See also

> Macro (contentbylabel)