public void ThrowReal(string message, bool isStackTrace, TmphCacheType cache) { var value = new TmphDebug { StackTrace = isStackTrace ? new StackTrace() : null, StackFrame = isStackTrace ? null : new StackFrame(1), Message = message }; if (cache == TmphCacheType.None || CheckCache(value, cache == TmphCacheType.Queue)) realOutput(value); throw new Exception(ExceptionPrefix + message); }
public void Add(string message, bool isStackTrace, TmphCacheType cache) { var value = new TmphDebug { StackTrace = isStackTrace ? new StackTrace() : null, StackFrame = isStackTrace ? null : new StackFrame(1), Message = message }; if (cache == TmphCacheType.None || CheckCache(value, cache == TmphCacheType.Queue)) output(value); }
public void ThrowReal(Exception exception, string message, TmphCacheType cache) { if (exception != null && exception.Message.StartsWith(ExceptionPrefix, StringComparison.Ordinal)) exception = null; if (exception == null) { if (message != null) ThrowReal(message, true, cache); } else { var value = new TmphDebug { Exception = exception, Message = message }; if (cache == TmphCacheType.None || CheckCache(value, cache == TmphCacheType.Queue)) realOutput(value); throw exception != null ? new Exception(ExceptionPrefix + message, exception) : new Exception(ExceptionPrefix + message); } }
public void Add(Exception error, string message, TmphCacheType cacheType) { if (error != null && error.Message.StartsWith(ExceptionPrefix, StringComparison.Ordinal)) error = null; if (error == null) { if (message != null) Add(message, true, cacheType); } else { var value = new TmphDebug { Exception = error, Message = message }; if (cacheType == TmphCacheType.None || CheckCache(value, cacheType == TmphCacheType.Queue)) output(value); } }