main.com.wisetrack.sdk.scheduler.RunnableWrapper.kt Maven / Gradle / Ivy
package com.wisetrack.sdk.scheduler
import com.wisetrack.sdk.WiseTrackFactory
/**
@author hamed (@hamed-hsb)
* @since 09th October 2021
*/
class RunnableWrapper(private var runnable: Runnable?) : Runnable{
override fun run() {
try {
runnable!!.run()
} catch (t: Throwable) {
WiseTrackFactory.getLogger().error(
"Runnable error [${ t.message}] of type [${t.javaClass.canonicalName}]",
)
}
}
}