> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# getErrorMessage

APISummary
When `TemplateBundle` is an invalid object, use this method to obtain the exception information that occurred during template parsing.

## Syntax

### Android

```java
public String getErrorMessage();
```

#### Return

- The exception information.

### iOS

```objc
- (NSString *_Nullable)errorMsg;
```

#### Return

- The exception information, if `nil` is returned, it proves that the `LynxTemplateBundle` is normal

### Harmony

```typescript
public getErrorMessage(): string;
```

#### Return

- The exception information during template parsing.

### Desktop (C++)

```cpp
std::string GetErrorMessage();
```

#### Return

- The parsing error message. An empty string means the bundle is valid.

## Compatibility

**Compatibility Table**

**Query:** `lynx-native-api.template-bundle.get-error-message`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-native-api/template-bundle/get-error-message.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| get-error-message | Yes (2.8) | Yes (3.4) | Yes (2.8) | Yes (3.7) | Yes (3.7) | No |

**`get-error-message`**

When TemplateBundle is an invalid object, use this method to obtain the exception information that occurred during template parsing.

**Specifications:**

