Created
August 4, 2014 20:43
-
-
Save djspiewak/0864e099a633ea734e1c 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
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