asp.net core环境下抛出异常堆栈信息不全
controller引用了一个使用了AOP的类,类中某方法抛异常出异常时(如空指针异常),异常堆栈信息最后只定位到controller调用这个类的这个方法的位置,没有定位到这个方法里发生异常的位置
这个问题不好解决吗?
emmm 是作者最近有点懒。。抽空看看
同遇到此问题,请问有更新计划吗?
https://github.com/dotnetcore/AspectCore-Framework/blob/cef611f027b05509f1867e1ce3899a93e3380656/src/AspectCore.Abstractions/DynamicProxy/AspectExceptionWrapper.cs#L16-L21
https://github.com/dotnetcore/AspectCore-Framework/blob/cef611f027b05509f1867e1ce3899a93e3380656/src/AspectCore.Core/Configuration/AspectConfiguration.cs#L15-L21
https://github.com/dotnetcore/AspectCore-Framework/blob/cef611f027b05509f1867e1ce3899a93e3380656/src/AspectCore.Extensions.DependencyInjection/ServiceCollectionExtensions.cs#L27-L34
不知为何ThrowAspectException 默认是为false。
单独注册一下设置为true就行了。
services.AddSingleton<IAspectConfiguration>(new AspectConfiguration { ThrowAspectException = true });
近期会处理这些问题 。谢谢理解