protected virtual void LocalDebug(Exception e )
{
if (OnDebug != null && ATMLContext.IsValid)
{
StringBuilder sb = new StringBuilder(string.Format("{0}{1}{2}{3}", e.Message, CRLF, e.StackTrace, CRLF));
Exception inner = e.InnerException;
while (inner != null)
{
sb.Append(inner.Message).Append(CRLF);
sb.Append(inner.StackTrace).Append(CRLF);
inner = inner.InnerException;
}
OnDebug(sb.ToString());
}
}