Thursday, April 25, 2019

throwing exceptions out of Attributes in C# behaves rotten (my opinion)

I guess an Attribute is for metadata and not runtime concerns. I thought a good pattern might be to verify a role at a Controller action and throw an exception upon a role missing. However, my attempts to catch error messages in middleware here and here, do not catch exceptions thrown from attributes. Lame!

No comments:

Post a Comment