/// <summary> /// Prepare a message for HopToad from a custom created notice. /// </summary> /// <param name="notice"></param> /// <exception cref="ArgumentNullException"><c>notice</c> is null.</exception> public HoptoadClient(HoptoadNotice notice) { if (notice == null) throw new ArgumentNullException("notice"); Notice = notice; }
/// <summary> /// Prepare a message for HopToad from an exception. /// </summary> /// <param name="e"></param> /// <exception cref="ArgumentNullException"><c>e</c> is null.</exception> public HoptoadClient(Exception e) { if (e == null) throw new ArgumentNullException("e"); Notice = new HoptoadNotice { ErrorClass = e.GetType().FullName, ErrorMessage = e.GetType().Name + ": " + e.Message, Backtrace = e.StackTrace, }; if (HttpContext.Current != null) Notice.HttpContext = HttpContext.Current; }
public HoptoadNoticeSub(HoptoadNotice notice) { Notice = notice; }