All Downloads are FREE. Search and download functionalities are using the official Maven repository.

app.cash.paparazzi.gradle.reporting.ErroringAction.kt Maven / Gradle / Ivy

The newest version!
package app.cash.paparazzi.gradle.reporting

import org.gradle.api.Action

internal abstract class ErroringAction : Action {
  override fun execute(thing: T) {
    try {
      doExecute(thing)
    } catch (e: Exception) {
      if (e is RuntimeException) throw e
      throw RuntimeException(e)
    }
  }

  @Throws(Exception::class)
  protected abstract fun doExecute(thing: T)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy