Created
November 29, 2010 15:24
-
-
Save mattandrews/720075 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.slf4j.LoggerFactory | |
import scala.util.control.Exception._ | |
trait Logging { | |
protected def log = LoggerFactory.getLogger(getClass) | |
protected def ignoreAndLogExceptions = catching(classOf[Exception]) withApply (e => log.warn("ignoring exception", e)) | |
protected def onErrorResumeNext = ignoreAndLogExceptions | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment