示例#1
0
 protected override void OnLoad(EventArgs e)
 {
     this.errorInformation = base.OwaContext.ErrorInformation;
     if (this.errorInformation == null)
     {
         this.errorInformation         = new ErrorInformation();
         this.errorInformation.Message = LocalizedStrings.GetNonEncoded(641346049);
     }
     else if (this.errorInformation.Exception != null)
     {
         Exception ex = this.errorInformation.Exception;
         if (ex is AsyncLocalizedExceptionWrapper)
         {
             ex = AsyncExceptionWrapperHelper.GetRootException(ex);
         }
         try
         {
             base.OwaContext.HttpContext.Response.Headers.Add("X-OWA-Error", ex.GetType().FullName);
         }
         catch (HttpException arg)
         {
             ExTraceGlobals.CoreTracer.TraceDebug <HttpException>(0L, "Exception happened while trying to append error headers. Exception will be ignored: {0}", arg);
         }
     }
     this.OnInit(e);
 }
示例#2
0
 internal void CheckExceptionAndEnd()
 {
     try
     {
         if (this.asyncException != null)
         {
             throw AsyncExceptionWrapperHelper.GetAsyncWrapper(this.asyncException);
         }
     }
     finally
     {
         base.End();
     }
 }
        private void CommonEndProxyRequest(IAsyncResult asyncResult)
        {
            ExTraceGlobals.ProxyCallTracer.TraceDebug((long)this.GetHashCode(), "ProxyEventHandler.EndProxyRequest");
            AsyncResult asyncResult2 = (AsyncResult)asyncResult;

            try
            {
                if (asyncResult2.Exception != null)
                {
                    ExTraceGlobals.ProxyTracer.TraceDebug((long)this.GetHashCode(), "An exception was thrown during the processing of the async request");
                    AsyncExceptionWrapperHelper.GetRootException(asyncResult2.Exception);
                    Utilities.HandleException(base.OwaContext, new OwaProxyException("Error handling EwsProxy", LocalizedStrings.GetNonEncoded(-200732695), asyncResult2.Exception, false));
                }
            }
            finally
            {
                this.Dispose();
            }
        }