Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 61e658cc authored by Rafael Tonholo's avatar Rafael Tonholo
Browse files

chore: convert ExceptionHelper to Kotlin

chore: move MessagingException to `:core:common` module; left legacy MessagingException for legacy compatibility
parent 86a754c6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ plugins {
}

dependencies {
    implementation(projects.core.common)
    implementation(projects.core.outcome)
    implementation(projects.feature.mail.account.api)
    implementation(projects.feature.mail.folder.api)
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ plugins {

dependencies {
    api(projects.backend.api)
    api(projects.core.common)
    api(projects.core.outcome)

    api(projects.feature.mail.account.api)
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ plugins {

dependencies {
    api(projects.backend.api)
    implementation(projects.core.common)

    api(libs.okhttp)
    implementation(libs.jmap.client)
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ dependencies {
    api(projects.backend.api)
    api(projects.mail.protocols.pop3)
    api(projects.mail.protocols.smtp)
    implementation(projects.core.common)

    testImplementation(projects.mail.testing)
}
+26 −0
Original line number Diff line number Diff line
package net.thunderbird.core.common.exception

open class MessagingException(
    override val message: String?,
    private val isPermanentFailure: Boolean,
    override val cause: Throwable?,
) : Exception(message, cause) {

    constructor(cause: Throwable?) : this(message = null, cause = cause, isPermanentFailure = false)
    constructor(message: String?) : this(message = message, cause = null, isPermanentFailure = false)
    constructor(message: String?, isPermanentFailure: Boolean) : this(
        message = message,
        cause = null,
        isPermanentFailure = isPermanentFailure,
    )

    constructor(message: String?, cause: Throwable?) : this(
        message = message,
        cause = cause,
        isPermanentFailure = false,
    )

    companion object {
        private const val serialVersionUID = -1
    }
}
Loading