Errors Class
Helper to check if an error is of a certain type.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const errors = new cdk.Errors();
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
errors = cdk.Errors()
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
Errors errors = new Errors();
// Install: dotnet add package Amazon.CDK.Lib
// 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();
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
errors := cdk.NewErrors()
Initializer
new Errors()
Errors()
new Errors()
new Errors()
NewErrors()
Methods
isAssertionError(x: any): boolean@staticmethod def is_assertion_error(x: Any) -> boolpublic static Boolean isAssertionError(Object x)public static bool IsAssertionError(object x)func IsAssertionError(X interface{}) *boolstatic#An AssertionError is thrown when an assertion fails.
isAssumptionError(x: any): boolean@staticmethod def is_assumption_error(x: Any) -> boolpublic static Boolean isAssumptionError(Object x)public static bool IsAssumptionError(object x)func IsAssumptionError(X interface{}) *boolstatic#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(x: any): boolean@staticmethod def is_cloud_assembly_error(x: Any) -> boolpublic static Boolean isCloudAssemblyError(Object x)public static bool IsCloudAssemblyError(object x)func IsCloudAssemblyError(X interface{}) *boolstatic#A CloudAssemblyError is thrown for unexpected problems with the synthesized assembly.
isConstructError(x: any): boolean@staticmethod def is_construct_error(x: Any) -> boolpublic static Boolean isConstructError(Object x)public static bool IsConstructError(object x)func IsConstructError(X interface{}) *boolstatic#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(x: any): boolean@staticmethod def is_execution_error(x: Any) -> boolpublic static Boolean isExecutionError(Object x)public static bool IsExecutionError(object x)func IsExecutionError(X interface{}) *boolstatic#An ExecutionError is thrown if an externally executed script or code failed.
isValidationError(x: any): boolean@staticmethod def is_validation_error(x: Any) -> boolpublic static Boolean isValidationError(Object x)public static bool IsValidationError(object x)func IsValidationError(X interface{}) *boolstatic#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.