Tag Archives: exception

ExceptionHelper

      Yorum yok ExceptionHelper

public static class ExceptionHelper { public static string GetMessage(this Exception ex) { StringBuilder expS = new StringBuilder(); expS.Append(ex.Message); Exception inner = ex.InnerException; while (inner != null) { expS.AppendFormat(“{0}-{1}”, Environment.NewLine, inner.Message); inner = inner.InnerException; } return expS.ToString(); } }