MySQL · Types · Errors

ArxDatabaseException

Definition

Namespace
ARX.SDK
Package
ARX.SDK
C#
public sealed class ArxDatabaseException : ArxException

The 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

C#

A line from a verified sample; the full, runnable code is on its page.

catch (ArxDatabaseException error) when (error.Code == ArxErrorCode.ForeignKeyViolation)

Create a record that points at another one, scenario 4

Used in: