MappingException
class MappingException(val reason: MappingExceptionReason, val details: String, cause: Throwable? = null, val path: MutableList<String> = mutableListOf()) : OctaviusException
Exception thrown when a type conversion or data mapping operation fails.
This includes scenarios like failing to convert data between incompatible types (e.g., mapping an Int to a String), missing columns in a database row, or missing required non-nullable properties in a Kotlin class.
Parameters
cause
The underlying exception that caused this failure, if any.
Constructors
Link copied to clipboard
constructor(reason: MappingExceptionReason, details: String, cause: Throwable? = null, path: MutableList<String> = mutableListOf())
Properties
Link copied to clipboard
The path in the nested object structure where the mapping error occurred.
Link copied to clipboard
The context of the query that resulted in this exception, if applicable.
Link copied to clipboard
The reason the mapping failed.
Link copied to clipboard
The raw error message received from the database, if applicable.