Class Errors
Helper to check if an error is of a certain type.
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Errors : DeputyBase
Syntax (vb)
Public Class Errors Inherits DeputyBase
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var errors = new Errors();
Synopsis
Constructors
| Errors() | Helper to check if an error is of a certain type. |
Methods
| IsAssertionError(object) | Test whether the given error is a AssertionError. |
| IsAssumptionError(object) | Test whether the given error is an AssumptionError. |
| IsCloudAssemblyError(object) | Test whether the given error is a CloudAssemblyError. |
| IsConstructError(object) | Test whether the given errors is a ConstructionError. |
| IsExecutionError(object) | Test whether the given error is an ExecutionError. |
| IsValidationError(object) | Test whether the given error is a ValidationError. |
Constructors
Errors()
Helper to check if an error is of a certain type.
public Errors()
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var errors = new Errors();
Methods
IsAssertionError(object)
Test whether the given error is a AssertionError.
public static bool IsAssertionError(object x)
Parameters
- x object
Returns
Remarks
An AssertionError is thrown when an assertion fails.
IsAssumptionError(object)
Test whether the given error is an AssumptionError.
public static bool IsAssumptionError(object x)
Parameters
- x object
Returns
Remarks
An AssumptionError is thrown when a construct made an assumption somewhere that doesn't hold true. This error always indicates a bug in the construct.
IsCloudAssemblyError(object)
Test whether the given error is a CloudAssemblyError.
public static bool IsCloudAssemblyError(object x)
Parameters
- x object
Returns
Remarks
A CloudAssemblyError is thrown for unexpected problems with the synthesized assembly.
IsConstructError(object)
Test whether the given errors is a ConstructionError.
public static bool IsConstructError(object x)
Parameters
- x object
Returns
Remarks
A ConstructionError is a generic error that will be thrown during the App construction or synthesis. To check for more specific errors, use the respective methods.
IsExecutionError(object)
Test whether the given error is an ExecutionError.
public static bool IsExecutionError(object x)
Parameters
- x object
Returns
Remarks
An ExecutionError is thrown if an externally executed script or code failed.
IsValidationError(object)
Test whether the given error is a ValidationError.
public static bool IsValidationError(object x)
Parameters
- x object
Returns
Remarks
A ValidationError is thrown when input props are failing to pass the rules of the construct. It usually means the underlying CloudFormation resource(s) would not deploy with a given configuration.