# Google Cloud Workflows V1 Client - Class Error (1.3.0)

1.3.0 (latest) 1.2.1 1.1.1 1.0.3 0.5.5 0.4.2 0.3.0 0.2.17 Reference documentation and code samples for the Google Cloud Workflows V1 Client class Error.

Error describes why the execution was abnormally terminated.

Generated from protobuf message `google.cloud.workflows.executions.v1.Execution.Error`

## Namespace

Google \\ Cloud \\ Workflows \\ Executions \\ V1 \\ Execution

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ payload` | `string` Error message and data returned represented as a JSON string. |
| `↳ context` | `string` Human-readable stack trace string. |
| `↳ stack_trace` | `https://docs.cloud.google.com/php/docs/reference/cloud-workflows/latest/Executions.V1.Execution.StackTrace` Stack trace with detailed information of where error was generated. |

### getPayload

Error message and data returned represented as a JSON string.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setPayload

Error message and data returned represented as a JSON string.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getContext

Human-readable stack trace string.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setContext

Human-readable stack trace string.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getStackTrace

Stack trace with detailed information of where error was generated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-workflows/latest/Executions.V1.Execution.StackTrace|null` |   |

### hasStackTrace

### clearStackTrace

### setStackTrace

Stack trace with detailed information of where error was generated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-workflows/latest/Executions.V1.Execution.StackTrace` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |