Raising arbitrary exceptions with failwith-style syntax

failwith/failwithf are a useful operators, but they only raise exceptions of type SystemException. Here's a simple way to generalize them.