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

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **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://93c50c48-43b0-4a60-b836-a32fb07b7aeb)

## See also

> Macro (contentbylabel)