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


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

## Description

> Macro (excerpt)
> 
> Returns the message 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://03a33a64-107d-43ec-91be-1bdb04c42b5b)


## See also

> Macro (contentbylabel)