Skip to content

Commit

Permalink
Merge branch 'feature/16605-exceptions' of https://github.com/CortexI…
Browse files Browse the repository at this point in the history
…ntelligentAutomation/docs into feature/16605-exceptions
  • Loading branch information
cortex-av committed Mar 5, 2024
2 parents fc26c40 + 62997fd commit 99519c5
Show file tree
Hide file tree
Showing 42 changed files with 1,786 additions and 335 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ The execution is attempting to perform a non-read operation on a read-only [ILis

##### Message Format

There was an attempt to modify a read-only list.

##### Message Format

The format of the exception message is as follows:

```json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,105 @@ description: "The exception thrown when trying to get a specified occurrence of
# {{% param title %}}

<p class="namespace">(Cortex.Exceptions.Collections.OccurrenceNotPresentException)</p>
{{% alert type="information" title="Information" %}}Improvements to this page are planned for the future.{{% /alert %}}

## Description

The exception thrown when trying to get a specified occurrence of an item from a collection, or set a specified occurrence of an item in a collection.

The format of the exception message is as follows:
## Reasons

### Occurrence provided is zero

The occurrence provided is equal to `0`.

#### Message Format

The format of the [Message][] is as follows:

```json
"<property-name> 0 cannot be used as it will perform no operations.
Please use a value greater or less than 0.
Please click the HelpLink for more information on how to fix this."
```

where:

* `<property-name>` is the name of the property which is not present.

#### How to fix

Provide an occurrence which is non-zero.

### Positive occurrence not present

The nth occurrence is not present.

#### Message Format

The format of the message is as follows:

```json
"The <nth> occurrence of the key <key-value> is not present in '<collection-object>'
Please click the HelpLink for more information on how to fix this."
```

where:

* `<nth>` is the specific occurrence that could not be found (e.g. 1st, 2nd, 3rd)
* `<key-value>` is the value of the key that was searched for in the collection
* `<collection-object>` is the name of the collection in which the search for the key took place.

#### How to fix

Provide an occurrence which is present (e.g. if there are 3 occurrences, you must specify a value between 1 and 3).

### Negative occurrence not present

The nth from last occurrence is not present.

#### Message Format

The format of the message is as follows:

```json
"TODO.
"The <nth> from last occurrence of the key <key-value> is not present in '<collection-object>'
Please click the HelpLink for more information on how to fix this."
```

## How to fix
where:

* `<nth>` is the specific occurrence that could not be found (e.g. 1st, 2nd, 3rd)
* `<key-value>` is the value of the key that was searched for in the collection
* `<collection-object>` is the name of the collection in which the search for the key took place.

#### How to fix

Provide an occurrence from last which is present (e.g. if there are 3 occurrences, you must specify a value between -1 and -3).

## Remarks

### Known Limitations

None

## See Also

### External Documentation

None

[Start Flow]: {{< url path="Cortex.Reference.Blocks.Flows.StartFlow.StartFlow.MainDoc" >}}
[End Flow]: {{< url path="Cortex.Reference.Blocks.Flows.EndFlow.EndFlow.MainDoc" >}}

[Wait For Duration]: {{< url path="Cortex.Reference.Blocks.Schedules.WaitFor.WaitForDuration.MainDoc" >}}

[Start Workspace]: {{< url path="Cortex.Reference.Blocks.Workspaces.StartWorkspace.StartWorkspace.MainDoc" >}}
[End Workspace]: {{< url path="Cortex.Reference.Blocks.Workspaces.EndWorkspace.EndWorkspace.MainDoc" >}}

[Blocks]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.MainDoc" >}}
[Block Properties]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.MainDoc" >}}
[Exceptions]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Exceptions.MainDoc" >}}

TODO:
[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}}
[TimePeriod]: {{< url path="Cortex.Reference.DataTypes.DateAndTime.TimePeriod.MainDoc" >}}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "CommandException"
linkTitle: "CommandException"
description: "Exception thrown when any command execution has resulted in an exception being thrown."
description: "The exception thrown when any command execution has resulted in an exception being thrown."
---

# {{% param title %}}
Expand All @@ -10,7 +10,7 @@ description: "Exception thrown when any command execution has resulted in an exc

## Description

Exception thrown when any command execution has resulted in an exception being thrown.
The exception thrown when any command execution has resulted in an exception being thrown.

## Reasons

Expand Down
Original file line number Diff line number Diff line change
@@ -1,70 +1,68 @@
---
title: "InvalidConnectionStringException"
linkTitle: "InvalidConnectionStringException"
description: "Exception thrown when an invalid connection string is used."
description: "The exception thrown when an invalid connection string is used."
---

# {{% param title %}}

<p class="namespace">(Cortex.Exceptions.Data.InvalidConnectionStringException)</p>
{{% alert type="information" title="Information" %}}Improvements to this page are planned for the future.{{% /alert %}}

Exception thrown when an invalid connection string is used.
## Description

The format of the exception message is as follows:
The exception thrown when an invalid connection string is used.

## Reasons

### Invalid connection string has been supplied

The connection string provided was invalid.

#### Message Format

The format of the message is as follows:

```json
"TODO.
"The connection string was invalid and failed with error message: <inner-exception-message>.
Please click the HelpLink for more information on how to fix this."
```

TODO: This is an example of how we can do exceptions with categories and error codes

| Category | Error Code | Notes |
|--------------------|--------------|------------------------------------------|
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |

## BasicCredentials.AccessTokenUri

### 300
where:

* `<inner-exception-message>` is the message of the inner exception caused by the invalid connection string being used.

#### How to fix

TODO:
Ensure that a valid connection string is provided for the data source being connected to; see [connectionstrings.com][ConnectionStrings] for valid examples.

### 301
## Remarks

#### How to fix
### Known Limitations

TODO:
None

### 302
## See Also

#### How to fix
### External Documentation

* [connectionstrings.com][ConnectionStrings]

[Start Flow]: {{< url path="Cortex.Reference.Blocks.Flows.StartFlow.StartFlow.MainDoc" >}}
[End Flow]: {{< url path="Cortex.Reference.Blocks.Flows.EndFlow.EndFlow.MainDoc" >}}

[Wait For Duration]: {{< url path="Cortex.Reference.Blocks.Schedules.WaitFor.WaitForDuration.MainDoc" >}}

[Start Workspace]: {{< url path="Cortex.Reference.Blocks.Workspaces.StartWorkspace.StartWorkspace.MainDoc" >}}
[End Workspace]: {{< url path="Cortex.Reference.Blocks.Workspaces.EndWorkspace.EndWorkspace.MainDoc" >}}

[Message]: {{< ref "#message" >}}

[Blocks]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.MainDoc" >}}
[Block Properties]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.MainDoc" >}}
[Exceptions]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Exceptions.MainDoc" >}}

[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}}
[TimePeriod]: {{< url path="Cortex.Reference.DataTypes.DateAndTime.TimePeriod.MainDoc" >}}

TODO:
[ConnectionStrings]: {{<url path="ConnectionStrings.MainDoc">}}
Original file line number Diff line number Diff line change
@@ -1,70 +1,71 @@
---
title: "PropertyNotNullableException"
linkTitle: "PropertyNotNullableException"
description: "The exception thrown when a property cannot accept a non-nullable value type."
description: "The exception thrown when a property that requires a nullable value is given a non-nullable value."
---

# {{% param title %}}

<p class="namespace">(Cortex.Exceptions.Decisions.PropertyNotNullableException)</p>
{{% alert type="information" title="Information" %}}Improvements to this page are planned for the future.{{% /alert %}}

The exception thrown when a property cannot accept a non-nullable value type.
## Description

The format of the exception message is as follows:
The exception thrown when a property that requires a [nullable][Nullable] value is given a non-nullable value.

## Reasons

### Invalid data type for property provided

The data type provided for the property is one that does not allow null values, e.g. [Int32][], [Boolean][], [Char][], etc.

#### Message Format

The format of the message is as follows:

```json
"TODO.
"'<property-name>' cannot accept data types that do not allow null values (e.g. Int32, Boolean, Char, etc.); it must be provided a data type which allows null values.
Please click the HelpLink for more information on how to fix this."
```

TODO: This is an example of how we can do exceptions with categories and error codes

| Category | Error Code | Notes |
|--------------------|--------------|------------------------------------------|
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |
| BasicCredentials | 300 | Some notes |
| | 301 | Some notes |
| | 302 | Some notes |

## BasicCredentials.AccessTokenUri

### 300
where:

* `<property-name>` is the name of the property which must have a [nullable][Nullable] type.

#### How to fix

TODO:
Ensure that the type of the value provided to the affected property is one that is [nullable][Nullable].

### 301
## Remarks

#### How to fix
### Known Limitations

TODO:
None

### 302
## See Also

### External Documentation

#### How to fix
None

[Message]: {{< ref "#message" >}}

[Blocks]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.MainDoc" >}}
[Block Properties]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.MainDoc" >}}
[Block Timeout]: {{<url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.CommonProperties.BlockTimeoutProperty">}}
[Executions]: {{<url path ="Cortex.Reference.Concepts.Fundamentals.Executions.MainDoc">}}
[Exceptions]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Exceptions.MainDoc" >}}
[Flows]: {{<url path="Cortex.Reference.Concepts.Fundamentals.Flows.MainDoc">}}
[Workspaces]: {{<url path="Cortex.Reference.Concepts.Fundamentals.Workspaces.MainDoc">}}

[Boolean]: {{<url path="Cortex.Reference.DataTypes.ConditionalLogic.Boolean.MainDoc">}}
[Char]: {{<url path="Cortex.Reference.DataTypes.Text.Char.MainDoc">}}
[Guid]: {{<url path="Cortex.Reference.DataTypes.Other.Guid.MainDoc">}}
[Int32]: {{<url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc">}}
[String]: {{<url path="Cortex.Reference.DataTypes.Text.String.MainDoc">}}

TODO:
[Nullable]: {{<url path="Cortex.Reference.Concepts.Fundamentals.DataTypes.NullAndNullableTypes.MainDoc">}}
[WhatIsABlock]: {{<url path="Cortex.Reference.Concepts.Fundamentals.Blocks.WhatIsABlock.MainDoc">}}
[WhatIsAnExecution]: {{<url path="Cortex.Reference.Concepts.Fundamentals.Executions.WhatIsAnExecution.MainDoc">}}
[WhatIsAFlow]: {{<url path="Cortex.Reference.Concepts.Fundamentals.Flows.WhatIsAFlow.MainDoc">}}
[WhatIsAWorkspace]: {{<url path="Cortex.Reference.Concepts.Fundamentals.Workspaces.WhatIsAWorkspace.MainDoc">}}
Loading

0 comments on commit 99519c5

Please sign in to comment.