# GC.Spread.CalcEngine.CalcError

## Content

# Class: CalcError

[Spread](../modules/GC.Spread).[CalcEngine](../modules/GC.Spread.CalcEngine).CalcError

## Table of contents

### Constructors

- [constructor](GC.Spread.CalcEngine.CalcError#constructor)

### Methods

- [toString](GC.Spread.CalcEngine.CalcError#tostring)
- [parse](GC.Spread.CalcEngine.CalcError#parse)

## Constructors

### <a id="constructor" name="constructor"></a> constructor

• **new CalcError**(`error`)

Represents an error in calculation.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `error` | `string` | The description of the error. |

## Methods

### <a id="tostring" name="tostring"></a> toString

▸ **toString**(): `string`

Returns a string that represents this instance.

#### Returns

`string`

The error string.

___

### <a id="parse" name="parse"></a> parse

▸ `Static` **parse**(`value`): [`CalcError`](GC.Spread.CalcEngine.CalcError)

Parses the specified error from the string.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value` | `string` | The error string. |

#### Returns

[`CalcError`](GC.Spread.CalcEngine.CalcError)

The calculation error.
