SQL Server · Types · Errors
ArxValidationException
Definition
- Namespace
ARX.SDK- Package
ARX.SDK
public sealed class ArxValidationException : ArxExceptionThe caller's input is invalid. Always raised before any database access.
Constructor
ArxValidationException(ArxErrorCode code, string message, Exception? innerException = null)A request refused before anything was sent to the database.
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. innerExceptionException?= nullThe error that caused it, if any.
Usage
A line from a verified sample; the full, runnable code is on its page.
catch (ArxValidationException error) when (error.Code == ArxErrorCode.InvalidLookup)Create a record that points at another one, scenario 4
Used in:
- Create a record that points at another oneCreate
- Catch an error by its codeCreate
- Where to declare: on the entity, or a schema for one call, never bothCreate
- Create without a catalogCreate
- Every supported .NET type, and what SQL Server storesCreate
- Instants, local times, dates and times of dayCreate
- Picklist values checked against the application's catalogCreate
- Values and names that come from users or filesCreate
- Catch an SQL injection attempt on createCreate
- Several calls in one ARX transaction: commit or roll backCreate
- Preload the schema at service setup: keys only, data types, StrictCreate
- Turn update errors into messagesUpdate
- Catch an SQL injection attempt on updateUpdate
- Updates in one ARX transaction: commit, roll back, abortUpdate
- Update on a preloaded schema: keys only, data types, StrictUpdate
- Update every row a filter matchesUpdateMultiple
- Put accounts on hold (selection set, by key)UpdateMultiple
- Delete without a catalogDelete
- Catch an SQL injection attempt on deleteDelete
- Delete on a preloaded schema: keys only, StrictDelete
- Turn read errors into messagesRetrieveMultiple
- Catch an SQL injection attempt on a searchRetrieveMultiple
- Retrieve on a preloaded schema: lookups found, column types, Strict, saved JSONRetrieveMultiple
- Catch an SQL injection attempt on ExecuteExecute
- Execute in an ARX transactionExecute
- Execute on a preloaded, Strict schema: routines aren't covered, tables areExecute
- The sample application