13 Replies
without any further context, I'm gonna have to say "don't use exceptions for normal control flow"
what to use instead? result objects?
you can catch them in a middleware
and do all checks about all type of exceptions?
probably make them inherit from a
DomainException
of sorts, so you can generalize it somewhat
but yeah that's considered a bad pattern, because it becomes harder to track the logic flowwhat about to make an exception filter for each controller action?
I wish c# had some syntax for result types to make them less verbose
yes…
yeah, I think that's actually better
because you can use the MVC action result system then
good. probably I will use this approach
probably a good bet
but it all depends on context
for what kind of context result objects will be better than exceptions?
most stuff in web land, for example