Although using Exceptions to control application flow is an anti-pattern but why some famous project do it?

mohammad ramezani 11 Reputation points
2021-11-10T16:47:57.58+00:00

According to many references like here and here, using Exceptions to control application flow is an anti-pattern that is not recommended. (Because of performance issues, Less readable and etc).

But my question is why do many famous boilerplates or advanced tutorial projects have used Exceptions to control flows? Like here in Microsoft eShopOnContainers project which is used custom exception (OrderingDomainException) and also Here in sample-dotnet-core-cqrs-api which return an exception to handle business rules.

does anyone know about the reason behind this?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,309 questions
{count} vote