rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
52 lines (25 loc) • 1.17 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [getNestedErrorCtor](./rc-js-util.getnestederrorctor.md)
## getNestedErrorCtor() function
Factory for creating a localized `NestedError` class, see [INestedError](./rc-js-util.inestederror.md)<!-- -->. This should be used to create a base class, from which you can create extensions to represent specific error cases.
**Signature:**
```typescript
export declare function getNestedErrorCtor<TLocalization>(config: INestedErrorCtorConfig<TLocalization>): INestedErrorCtor<TLocalization, INestedError<TLocalization>>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
config
</td><td>
[INestedErrorCtorConfig](./rc-js-util.inestederrorctorconfig.md)<!-- --><TLocalization>
</td><td>
</td></tr>
</tbody></table>
**Returns:**
[INestedErrorCtor](./rc-js-util.inestederrorctor.md)<!-- --><TLocalization, [INestedError](./rc-js-util.inestederror.md)<!-- --><TLocalization>>