Amazon DynamoDB · Types · Errors
ArxDatabaseException
Definition
- Namespace
ARX.SDK- Package
ARX.SDK
public sealed class ArxDatabaseException : ArxExceptionThe database reported an error. The native exception is the InnerException.
Constructor
ArxDatabaseException(ArxErrorCode code, string message, Exception innerException)A database error mapped to its ARX code; the driver's exception is the inner exception.
Parameter Type Description codeArxErrorCodeThe ARX error code: its thousands digit is the category. messagestringA message for logs and developers. It names tables, columns and constraints, never values. innerExceptionExceptionThe driver's exception (PostgresException, SqlException, MySqlException, a MongoException or an AmazonDynamoDBException).
Methods
static ArxException InLinkWhenItIs(ArxException mapped, ARX.SDK.Query.ArxQueryExpression query)For the providers' use: an ARX5002 UndefinedAttribute from a query whose missing column only its link entities name, said of the link's table (
EntityName) and alias instead of the query's own table. Any other error is returned as it is.Parameter Type Description mappedArxExceptionThe error the provider's mapper made, with the missing column as its AttributeName.queryARX.SDK.Query.ArxQueryExpressionThe query that was sent.
Usage
A line from a verified sample; the full, runnable code is on its page.
catch (ArxDatabaseException exception) when (exception.Code == ArxErrorCode.UniqueViolation)Catch the errors a create meets, scenario 1
Used in:
- Catch the errors a create meetsCreate
- Create in an ARX transactionCreate
- Create many records in one callCreateMultiple
- Move an item to a new keyUpdate
- Replace a record in a transactionDelete