NickCraver / StackExchange.Exceptional

Error handler used for the Stack Exchange network
https://nickcraver.com/StackExchange.Exceptional/
Apache License 2.0
860 stars 170 forks source link

Missing app.UseExceptional(...) overloads #120

Closed xps closed 6 years ago

xps commented 6 years ago

Following the documentation at https://nickcraver.com/StackExchange.Exceptional/AspDotNetCore, I am trying to pass settings to app.UseExceptional(...), but there is only one overload of that method, and it doesn't take any argument (see the ExceptionalBuilderExtensions file).

How can I configure it, especially the exception storage?

PS: using the latest 2.x branch on ASP.NET Core

Thanks

xps commented 6 years ago

I'll answer my own question: the configuration is now passed to the .AddExceptional(...) method, instead of .UseExceptional(...).

Would you like me to submit a PR to update the documentation?

nickalbrecht commented 6 years ago

AddExceptional() is for adding the options/settings that Exceptional needs to the services collection for use with dependency injection. UseExceptional() is for setting up the middleware for actually handling the errors. This naming convention is very common with ASPNET Core. You will most likely need both in your app to take full advantage of Exceptional.

NickCraver commented 6 years ago

@xps absolutely I'd love a PR since you noticed this, time is very thing and all help is tremendously appreciated.

mmillican commented 6 years ago

A PR is on the way for this (it combined with my other one. Hope this is OK)

NickCraver commented 6 years ago

Fixed via #123 :)