WrappedException
data class WrappedException(val exceptionClass: Class<out Throwable>, var stackTrace: String, var message: String?, var cause: String?, var localizedMessage: String?)
A wrapper class for exceptions to make them serializable.
Parameters
exceptionClass
The class of the exception.
stackTrace
The stack trace of the exception as a string.
message
The message of the exception.
cause
The cause of the exception as a string.
localizedMessage
The localized message of the exception.
Constructors
Types
Link copied to clipboard
data class DetailsConfiguration(val includeStackTrace: Boolean = true, val includeMessage: Boolean = true, val includeCause: Boolean = true, val includeLocalizedMessage: Boolean = true)
Represents the configuration options for including various details when handling or transforming exceptions in the WrappedException class. Exception Class can't be excluded
Link copied to clipboard
Wraps WrappedException again in real Exception
Functions
Link copied to clipboard
fun applyDetailsConfiguration(configuration: WrappedException.DetailsConfiguration): WrappedException
Applies the specified configuration to the current exception, modifying the details such as stack trace, message, cause, and localized message based on the configuration provided.
Link copied to clipboard
Converts the wrapped exception to a WrappedExceptionException.