Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Test mode #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dk.nodes.arch.domain.interactor

import android.util.Log
import dk.nodes.arch.domain.executor.Executor
import dk.nodes.arch.domain.executor.TestExecutor

abstract class BaseInteractor(protected val executor: Executor) : Interactor {

Expand All @@ -10,9 +11,14 @@ abstract class BaseInteractor(protected val executor: Executor) : Interactor {
try {
execute()
} catch (t: Throwable) {
Log.e("BaseInteractor", "Uncaught throwable in thread ${Thread.currentThread()?.name}")
Log.e("BaseInteractor", Log.getStackTraceString(t))
submitToHockey(t)
if (executor is TestExecutor) {
throw t
} else {
Log.e("BaseInteractor", "Uncaught throwable in thread ${Thread.currentThread()?.name}"
)
Log.e("BaseInteractor", Log.getStackTraceString(t))
submitToHockey(t)
}
}
})
}
Expand Down