/// <summary> /// Throws an exception for an error message event. /// </summary> /// <param name="mea">Message event arguments.</param> public static void OnMessage(MessageEventArgs e) { WixErrorEventArgs errorEventArgs = e as WixErrorEventArgs; if (null != errorEventArgs) { throw new WixException(errorEventArgs); } }
/// <summary> /// Sends a message to the message delegate if there is one. /// </summary> /// <param name="mea">Message event arguments.</param> public void OnMessage(MessageEventArgs e) { WixErrorEventArgs errorEventArgs = e as WixErrorEventArgs; if (null != errorEventArgs) { this.encounteredError = true; } this.extension.OnMessage(e); }
/// <summary> /// Sends a message to the message delegate if there is one. /// </summary> /// <param name="mea">Message event arguments.</param> private void OnMessage(MessageEventArgs mea) { WixErrorEventArgs errorEventArgs = mea as WixErrorEventArgs; if (null != this.Message) { this.Message(this, mea); } else if (null != errorEventArgs) { throw new WixException(errorEventArgs); } }
/// <summary> /// Sends a message to the <see cref="Message"/> delegate if there is one. /// </summary> /// <param name="e">Message event arguments.</param> /// <remarks> /// <para><b>Notes to Inheritors:</b> When overriding <b>OnMessage</b> /// in a derived class, be sure to call the base class's /// <b>OnMessage</b> method so that registered delegates recieve /// the event.</para> /// </remarks> public virtual void OnMessage(MessageEventArgs e) { WixErrorEventArgs errorEventArgs = e as WixErrorEventArgs; if (null != this.Message) { this.Message(this, e); } else if (null != errorEventArgs) { throw new WixException(errorEventArgs); } }
/// <summary> /// Sends a message to the message delegate if there is one. /// </summary> /// <param name="mea">Message event arguments.</param> public void OnMessage(MessageEventArgs mea) { WixErrorEventArgs errorEventArgs = mea as WixErrorEventArgs; if (null != errorEventArgs) { this.encounteredError = true; } if (null != this.MessageHandler) { this.MessageHandler(this, mea); } else if (null != errorEventArgs) { throw new WixException(errorEventArgs); } }
/// <summary> /// Sends a message to the message handler if there is one. /// </summary> /// <param name="mea">Message event arguments.</param> public void OnMessage(MessageEventArgs e) { WixErrorEventArgs errorEventArgs = e as WixErrorEventArgs; if (null != errorEventArgs || MessageLevel.Error == e.Level) { this.encounteredError = true; } if (null != this.messageHandler) { this.messageHandler.OnMessage(e); } else if (null != errorEventArgs) { throw new WixException(errorEventArgs); } }
/// <summary> /// Sends a message to the message delegate if there is one. /// </summary> /// <param name="mea">Message event arguments.</param> public void OnMessage(MessageEventArgs mea) { WixErrorEventArgs errorEventArgs = mea as WixErrorEventArgs; if (null != errorEventArgs) { this.encounteredError = true; } if (null != this.Message) { this.Message(this, mea); if (MessageLevel.Error == mea.Level) { this.encounteredError = true; } } else if (null != errorEventArgs) { throw new WixException(errorEventArgs); } }
/// <summary> /// Sends a message to the message delegate if there is one. /// </summary> /// <param name="mea">Message event arguments.</param> private void OnMessage(MessageEventArgs e) { WixErrorEventArgs errorEventArgs = e as WixErrorEventArgs; if (null != errorEventArgs) { this.encounteredError = true; } if (null != this.Message) { this.Message(this, e); if (MessageLevel.Error == e.Level) { this.encounteredError = true; } } else if (null != errorEventArgs) { throw new WixException(errorEventArgs); } }
/// <summary> /// Sends a message to the message delegate if there is one. WARNING: if warnings-as-errors is turned on, this won't stop the build on a warning. /// </summary> /// <param name="mea">Message event arguments.</param> private void OnMessage(MessageEventArgs mea) { WixErrorEventArgs errorEventArgs = mea as WixErrorEventArgs; if (null != this.Message) { lock (this.lockObject) { if (null != errorEventArgs) { this.threadError = errorEventArgs.Id; } this.Message(this, mea); } } else if (null != errorEventArgs) { lock (this.lockObject) { this.threadError = errorEventArgs.Id; } throw new WixException(errorEventArgs); } }
/// <summary> /// Instantiate a new WixNotOutputException. /// </summary> /// <param name="error">Localized error information.</param> public WixNotOutputException(WixErrorEventArgs error) : base(error) { }
/// <summary> /// Instantiate new WixMissingTableDefinitionException. /// </summary> /// <param name="error">Localized error information.</param> public WixMissingTableDefinitionException(WixErrorEventArgs error) : base(error) { }
/// <summary> /// Instantiate a new WixNotIntermediateException. /// </summary> /// <param name="error">Localized error information.</param> public WixNotIntermediateException(WixErrorEventArgs error) : base(error) { }
/// <summary> /// Instantiate a new WixNotLibraryException. /// </summary> /// <param name="error">Localized error information.</param> public WixNotLibraryException(WixErrorEventArgs error) : base(error) { }
/// <summary> /// Instantiate a new WixException with a given WixError. /// </summary> /// <param name="error">The localized error information.</param> /// <param name="exception">Original exception.</param> public WixException(WixErrorEventArgs error, Exception exception) : base(String.Empty, exception) { this.error = error; }
/// <summary> /// Instantiate a new WixException with a given WixError. /// </summary> /// <param name="error">The localized error information.</param> public WixException(WixErrorEventArgs error) { this.error = error; }
/// <summary> /// Instantiate a new WixException with a given WixError. /// </summary> /// <param name="error">The localized error information.</param> public WixException(WixErrorEventArgs error) : this(error, null) { }