Created
June 27, 2014 21:29
-
-
Save einarwh/7b0aec7f7f72c8e5bdc8 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
TR Call<TR, TE>( | |
Func<TR> f, | |
Func<TE, TR> h) | |
where TE : Exception | |
{ | |
try { | |
return f(); | |
} | |
catch (TE ex) { | |
return h(ex); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment