mruanova
05-12-2006, 06:40 PM
am using this advices with no problem: ConsoleLoggingBeforeAdvice, ConsoleLoggingAfterAdvice, ConsoleLoggingAroundAdvice.
But I have problems with ConsoleLoggingThrowsAdvice. I confess that the simple scenario works, but I am doing some complex scenarios and i got the next exception message, hope that someboy could help, thanks a lot.
------ Test started: Assembly: UnitTests.dll ------
TestCase UnitTests.FactoryBaseTest.Create_Advices' failed:
System.ArgumentException:
At least one handler method must be found in class
[Spring.Aop.DynamicProxy.Proxy_d69022928714448cb72 e 7c1b340a4a30].
at Spring.Aop.Framework.Adapter.ThrowsAdviceIntercept or..ctor(Object advice)
at Spring.Aop.Framework.Adapter.ThrowsAdviceAdapter.G etInterceptor(IAdvisor advisor)
at Spring.Aop.Framework.Adapter.DefaultAdvisorAdapter Registry.GetInterceptor(IAdvisor advisor)
at Spring.Aop.Framework.AdvisorChainFactoryUtils.Calc ulateInterceptors(IAdvised config, Object proxy, MethodInfo method, Type targetType)
at Spring.Aop.Framework.HashtableCachingAdvisorChainF actory.GetInterceptors(IAdvised advised, Object proxy, String methodId, MethodInfo method, Type targetType)
at Spring.Aop.Framework.DynamicProxy.BaseCompositionP roxy.GetInterceptors(Type targetType, String methodId, MethodInfo method)
at Spring.Aop.DynamicProxy.Proxy_a1bf817697604fd0a002 46ce40cb7a28.Print(String message)
c:\unittests\factorybasetest.cs(123,0): at UnitTests.FactoryBaseTest.Create_Advices()
0 passed, 1 failed, 0 skipped, took 2.13 seconds.
But I have problems with ConsoleLoggingThrowsAdvice. I confess that the simple scenario works, but I am doing some complex scenarios and i got the next exception message, hope that someboy could help, thanks a lot.
------ Test started: Assembly: UnitTests.dll ------
TestCase UnitTests.FactoryBaseTest.Create_Advices' failed:
System.ArgumentException:
At least one handler method must be found in class
[Spring.Aop.DynamicProxy.Proxy_d69022928714448cb72 e 7c1b340a4a30].
at Spring.Aop.Framework.Adapter.ThrowsAdviceIntercept or..ctor(Object advice)
at Spring.Aop.Framework.Adapter.ThrowsAdviceAdapter.G etInterceptor(IAdvisor advisor)
at Spring.Aop.Framework.Adapter.DefaultAdvisorAdapter Registry.GetInterceptor(IAdvisor advisor)
at Spring.Aop.Framework.AdvisorChainFactoryUtils.Calc ulateInterceptors(IAdvised config, Object proxy, MethodInfo method, Type targetType)
at Spring.Aop.Framework.HashtableCachingAdvisorChainF actory.GetInterceptors(IAdvised advised, Object proxy, String methodId, MethodInfo method, Type targetType)
at Spring.Aop.Framework.DynamicProxy.BaseCompositionP roxy.GetInterceptors(Type targetType, String methodId, MethodInfo method)
at Spring.Aop.DynamicProxy.Proxy_a1bf817697604fd0a002 46ce40cb7a28.Print(String message)
c:\unittests\factorybasetest.cs(123,0): at UnitTests.FactoryBaseTest.Create_Advices()
0 passed, 1 failed, 0 skipped, took 2.13 seconds.