/// <summary> /// An event handler called when the current request throws an exception. /// </summary> /// <param name="exception">The exception.</param> /// <param name="state">The request state.</param> protected virtual void OnRequestException(Exception exception, RequestState state) { // If the request state is not null. if (null != state) { // If the delegate for this method is not null. if (null != state.ActionRequestException) { // Call the delegate. state.ActionRequestException(exception, state); } } }