Skip to content

Instantly share code, notes, and snippets.

@djspiewak
Created August 4, 2014 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djspiewak/0864e099a633ea734e1c to your computer and use it in GitHub Desktop.
Save djspiewak/0864e099a633ea734e1c to your computer and use it in GitHub Desktop.
package com.rr.sinks
package object util {
/**
* Convenient workaround for soul-sucking exception
* swallowing code like Netty's futures.
*/
def catchLogThrow[A](body: => A): A = {
try {
body
} catch {
case t: Throwable => {
t.printStackTrace()
throw t
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment