Skip to content
Documentation

HAKOM.Persistence.Sql.Net.Api.Exceptions Namespace

Contains exception types that are raised by the database-agnostic SQL persistence layer when connection, query, or column-reading operations fail.

All exceptions in this namespace inherit from HakomException and carry a unique HK##### error code. Each exception also specifies an System.Net.HttpStatusCode so that HTTP middleware can map it to the appropriate response status.

The exceptions defined here are:

Classes
AttemptingToConnectToSqlDatabaseFailedException The exception that is thrown when no connection to the SQL data base has been established.
ColumnIsNullException Thrown when attempting to read null values with not-nullable return types.
ConnectionDidNotReturnTheProperCommandTypeException TryCreateCommand(TConnection) is not able to create a command object.
InvalidColumnTypeException Thrown if the column type does not match the expected type.
InvalidSqlFloatValueException Exception thrown when an attempt is made to insert an invalid floating-point value, such as NaN or Infinity, into a SQL Server FLOAT column.
NoParserSuppliedException Neither sync nor async parser function was supplied for a select method of: SqlStorageProvider<TConnection,TCommand,TNativeParameter,TReader,TParameter,TParameterFactory>.
ParserThrewAnErrorException This exception is thrown when a value from an SQL database (with Select or TrySelect) could not be parsed to the desired object.
ProviderFactoryDidNotReturnTheProperConnectionTypeException Thrown if the System.Data.Common.DbProviderFactory returns a connection type which does not match TConnection of SqlStorageProvider<TConnection,TCommand,TNativeParameter,TReader,TParameter,TParameterFactory>.
SelectQueryDidNotReturnAnyRowsException Thrown when a call to SelectFirst<TResult>(string, Func<TReader,Task<TResult>>, CancellationToken) or similar returned no results.
UnexpectedErrorDuringQueryException Thrown when an unexpected error occurred during an SQL query.
© 2026 Volue.Version v0.6.38017 November 2026