private static string KindToString(ExceptionKind ek) { switch (ek) { case ExceptionKind.Inner: return "Inner exception"; case ExceptionKind.LoaderException: return "Loader exception"; default: return "Exception"; } }