# LicenseError Class

> LicenseError class in the TX Sheet Control JavaScript API for the browser, with its syntax, 1 property and a JavaScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Path:** TX Sheet Control > API Reference > JavaScript API > Browser Editor > LicenseError Class
- **363 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/licenseerror/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/licenseerror/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/licenseerror/llms-full.txt

---

Public class for LicenseError.

Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

ES module import: `import { LicenseError } from '@txtextcontrol/tx-sheet-control';`.

### Constructor

```javascript
new LicenseError(code)
```

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `code` | `LicenseErrorCode` | No | Value matching code's declared type and the owning object's validation rules. |

Returns: `Error & { readonly code: LicenseErrorCode; }`.

### Members

#### Properties

| Property | Description |
|---|---|
| [code](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/licenseerror/code-property/llms-full.txt) | The code value of LicenseError. |

### Examples

Pass the LicenseError value obtained from its owning control, collection, callback or operation. The function reads that value without constructing a replacement document object.

```javascript
function inspectLicenseErrorCode(licenseError) {
    const value = licenseError['code'];
    console.log('LicenseError.code', value);
}
```

### See Also

- [JavaScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)

---

## In This Section

- [LicenseError.code Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/licenseerror/code-property/llms-full.txt): LicenseError.code property in the TX Sheet Control JavaScript API for the browser, with its type LicenseErrorCode and a JavaScript example.

---

## Nearby

- **Previous:** [getRegisteredLanguages Function](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/getregisteredlanguages-function/llms-full.txt)
- **Next:** [LicenseError.code Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/licenseerror/code-property/llms-full.txt)
