//Resumeable? /// <summary> /// Raises an <see cref="Common.Exception"/> on the calling thread. /// </summary> /// <typeparam name="T">The type of the exception to raise.</typeparam> /// <param name="tag">The element related to the exception</param> /// <param name="message">The message realted to the exception, if not provided a default message will be used.</param> /// <param name="innerException">any <see cref="System.Exception"/> which is related to the exception being thrown</param> public static void RaiseTaggedException <T>(T tag, string message, System.Exception innerException = null) { new TaggedException <T>(tag, message ?? TaggedException <T> .DefaultExceptionTypeMessage <T>(), innerException).Raise(); }
/// <summary> /// Tries to <see cref="Raise"/> the given <see cref="TaggedException"/> /// </summary> /// <typeparam name="T">The type related to the exception.</typeparam> /// <param name="exception">The <see cref="System.Exception"/> which occured.</param> public static void TryRaise <T>(this TaggedException <T> exception) //storeData { try { exception.Raise(); } catch { /*hide*/ } }