/// <summary> /// Method that is called by default when validation fails. Overwrite this to customize response /// </summary> /// <param name="eventArgs">Information about the value that is being Validated</param> private static void _defaultUnexpectedHandler(GuardEventArgs eventArgs) { GuardViolationException pe = new GuardViolationException(eventArgs.ApplicationName, eventArgs.Message); pe.Data.Add("ValidationDetails", eventArgs); throw pe; }
/// <summary> /// Method that is called by default when validation fails. Overwrite this to customize response /// </summary> /// <param name="eventArgs">Information about the value that is being Validated</param> private static void _defaultUnexpectedHandler(GuardEventArgs eventArgs) { GuardViolationException pe = new GuardViolationException(eventArgs.ApplicationName, eventArgs.Message); pe.Data.Add("ValidationDetails", eventArgs); throw pe; }