<aside> <img src="attachment:a3a56fc3-c53c-47ff-aacc-d7c34f62abfd:table_of_content.png" alt="attachment:a3a56fc3-c53c-47ff-aacc-d7c34f62abfd:table_of_content.png" width="40px" />

TABLE OF CONTENT

</aside>

:ij-kt-class: ClassMismatchException


Package dev.tommasop1804.kutils.exceptions
Since version 8.0.0
Extended class :ij-kt-class: ValidationFailedException

Represents an exception that is thrown when the provided class of a variable/parameter is not the class the software is expecting.

Constructors

constructor() : super()
constructor(expectedClass: KClass<*>, cause: Throwable? = null) : super("Expected class was ${expectedClass.qualifiedName}", cause)
constructor(expectedClass: KClass<*>?, actualClass: KClass<*>, cause: Throwable? = null) : super(if (expectedClass.isNull()) "Actual class: ${actualClass.qualifiedName}"else "Expected class was $expectedClass, but got ${actualClass.qualifiedName}", cause)
constructor(message: String?) : super(message)
constructor(message: String?, cause: Throwable?) : super(message, cause)
constructor(cause: Throwable?) : super(cause)
constructor(property: KProperty<*>?, variableName: String? = null, expectedClass: KClass<*>) : super($$"($${if (variableName.isNotNullOrBlank()) "`$variableName` of type " else ""}`$${property?.ownerClass?.simpleName}`$`$${property?.name}` of type `$${property?.returnType})` was expected to be of type `$${expectedClass?.qualifiedName}`")
constructor(property: KProperty<*>?, variable: KProperty<*>? = null, expectedClass: KClass<*>?) : super($$"($${if (variable.isNotNull()) "`${variable.name}` of type " else ""}`$${property?.ownerClass?.qualifiedName}`$`$${property?.name}` of type `$${property?.returnType})` was expected to be of type `$${expectedClass?.qualifiedName}`")
constructor(callable: KFunction<*>?, parameterName: String?, expectedClass: KClass<*>?) : super($$"(<parameters of `$${callable?.name}`>$`$${callable?.parameters?.find { it.name == parameterName }?.name}` of type `$${callable?.parameters?.find { it.name == parameterName }?.type}`) was expected to be of type `$${expectedClass?.qualifiedName}`")
constructor(callableName: String?, parameterName: String?, expectedClass: KClass<*>?, actualClass: KClass<*>?) : super($$"(<parameters of `$$callableName`>$`$$parameterName` of type `$$actualClass`) was expected to be of type `$${expectedClass?.qualifiedName}`")
constructor(callable: KFunction<*>?, parameter: KParameter?, expectedClass: KClass<*>?) : super($$"(<parameters of `$${callable?.name}`>$`$${parameter?.name}` of type `$${parameter?.type}`) was expected to be of type `$${expectedClass?.qualifiedName}`")
constructor(callableName: String?, parameter: KParameter?, expectedClass: KClass<*>?) : super($$"(<parameters of `$${callableName}`>$`$${parameter?.name}` of type `$${parameter?.type}`) was expected to be of type `$${expectedClass?.qualifiedName}`")
constructor(property: KProperty<*>?, variableName: String? = null, expectedClass: KClass<*>?, cause: Throwable?) : super($$"($${if (variableName.isNotNullOrBlank()) "`$variableName` of type " else ""}`$${property?.ownerClass?.simpleName}`$`$${property?.name}` of type `$${property?.returnType})` was expected to be of type `$${expectedClass?.qualifiedName}`",cause)
constructor(property: KProperty<*>?, variable: KProperty<*>? = null, expectedClass: KClass<*>?, cause: Throwable?) : super($$"($${if (variable.isNotNull()) "`${variable.name}` of type " else ""}`$${property?.ownerClass?.simpleName}`$`$${property?.name}` of type `$${property?.returnType})` was expected to be of type `$${expectedClass?.qualifiedName}`",cause)
constructor(callable: KFunction<*>?, parameterName: String?, expectedClass: KClass<*>?, cause: Throwable?) : super($$"(<parameters of `$${callable?.name}`>$`$${callable?.parameters?.find { it.name == parameterName }?.name}` of type `$${callable?.parameters?.find { it.name == parameterName }?.type}`) was expected to be of type `$${expectedClass?.qualifiedName}`",cause)
constructor(callableName: String?, parameterName: String?, expectedClass: KClass<*>?, actualClass: KClass<*>?, cause: Throwable?) : super($$"(<parameters of `$$callableName`>$`$$parameterName` of type `$$actualClass`) was expected to be of type `$${expectedClass?.qualifiedName}`",cause)
constructor(callable: KFunction<*>?, parameter: KParameter?, expectedClass: KClass<*>?, cause: Throwable?) : super($$"(<parameters of `$${callable?.name}`>$`$${parameter?.name}` of type `$${parameter?.type}`) was expected to be of type `$${expectedClass?.qualifiedName}`",cause)
constructor(callableName: String?, parameter: KParameter?, expectedClass: KClass<*>?, cause: Throwable?) : super($$"(<parameters of `$${callableName}`>$`$${parameter?.name}` of type `$${parameter?.type}`) was expected to be of type `$${expectedClass?.qualifiedName}`",cause)

:ij-kt-class: CompilationException


Package dev.tommasop1804.kutils.exceptions
Since version 1.0.0
Extended class RuntimeException

Represents an exception that is thrown when an error occurs during the compilation process.

Constructors

constructor() : super("Error while compiling.")
constructor(language: Language) : super("Error while compiling ${language.displayName}.")
constructor(message: String?) : super("Error while compiling. $message")
constructor(language: Language, message: String?) : super("Error while compiling ${language.displayName}. $message")
constructor(cause: Throwable?) : super("Error while compiling.", cause)
constructor(language: Language, cause: Throwable?) : super("Error while compiling ${language.displayName}.", cause)
constructor(message: String?, cause: Throwable?) : super("Error while compiling. $message", cause)
constructor(language: Language, message: String?, cause: Throwable?) : super("Error while compiling ${language.displayName}. $message", cause)

:ij-kt-class: ConfigurationException