Files
BeWoPlaner/BeWo/ServiceProxy/ServiceExceptionHandlingInterceptor.cs

27 lines
986 B
C#
Raw Permalink Normal View History

2016-06-27 01:45:38 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Windows;
using System.Reflection;
using Proxies;
namespace BeWo.ServiceProxy
{
public class ServiceExceptionHandlingInterceptor : InvocationHandler
{
public void AfterMethodInvocationWithException(MethodContextInfo CurrentMethod, Exception GeneratedException, ref bool BubbleGeneratedException, ref bool BubbleException)
{
//TODO: SERVICE EXCEPTION HANDLING
MessageBox.Show(GeneratedException.InnerException.Message);
BubbleException = false;
}
public void BeforeMethodInvocation(MethodContextInfo CurrentMethod, ref object[] MethodArgs, ref bool CallMethod, ref bool BubbleException) { }
public void AfterMethodInvocation(MethodContextInfo CurrentMethod, ref object[] MethodArgs, ref object ReturnValue, ref bool BubbleException) { }
}
}