public static string GetExceptionType(Exception ex) { string exceptionType = ex.GetType().ToString(); return exceptionType.Substring( exceptionType.LastIndexOf('.') + 1); }