public static void HandleException(this DevExpress.ExpressApp.XafApplication application, Exception exception) { try { var platform = application.GetPlatform(); switch (platform) { case Platform.Win: application.CallMethod("HandleException", exception); break; case Platform.Web: CurrentDomain.XAF().ErrorHandling().CallMethod("SetPageError", exception); break; default: application.GetPropertyValue("ExceptionService").CallMethod("HandleException", exception); break; } Tracer.LogError(exception); } catch (Exception e) { Tracer.LogError(e); throw; } }
public static void HandleException(this DevExpress.ExpressApp.XafApplication application, System.Exception exception) { Tracing.Tracer.LogError(exception); try{ if (application.GetPlatform() == Platform.Win) { application.CallMethod("HandleException", exception); } else { System.AppDomain.CurrentDomain.XAF().ErrorHandling().CallMethod("SetPageError", exception); } } catch (System.Exception e) { Tracing.Tracer.LogError(e); throw; } }