awscrt.exceptions

awscrt.exceptions.from_code(code)

Given an AWS Common Runtime error code, return an exception.

Returns a common Python exception type, if it’s appropriate. For example, code=1 aka AWS_ERROR_OOM will result in MemoryError. Otherwise, an AwsCrtError is returned.

Parameters:

code (int) – error code.

Returns:

BaseException

exception awscrt.exceptions.AwsCrtError(code, name, message)

Base exception class for AWS Common Runtime exceptions.

Parameters:
  • code (int) – Int value of error.

  • name (str) – Name of error.

  • message (str) – Message about error.

code

Int value of error.

Type:

int

name

Name of error.

Type:

str

message

Message about error.

Type:

str