Nancy文档说您可以使用pipelines.OnError += (x, y) =>...来处理错误,但是我已经看过一些使用pipelines.OnError.AddItemToEndOfPipeline((x, y) =>...的教程。
两者似乎都会导致错误被正确处理。这两者之间真的有什么区别吗?
发布于 2014-08-05 06:18:09
没有pipelines.OnError += (x ,y) => ...像pipelines.OnError.AddItemToEndOfPipeline((x, y) => ..)那样将处理程序添加到管道的末尾。
见源代码:https://github.com/NancyFx/Nancy/blob/master/src/Nancy/ErrorPipeline.cs#L39
https://stackoverflow.com/questions/25128667
复制相似问题