-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
feature request 📬A request for new changes to improve functionalityA request for new changes to improve functionalityimprovements ✨
Milestone
Description
Describe the problem this feature would solve
Currently, the Guard
API is suitable for parameter validation but nothing more, and consumers still likely need a ThrowHelper
type for other sorts of exceptions
Describe the solution
Expose a public ThrowHelper
type (the current one internal) that provides throwing methods for a wider variety of types. The basic layout of each method would be
[DoesNotReturn]
public void ThrowFooException(string? message = null, Exception inner? = null)
{
throw new FooException(message, inner);
}
With different params for exceptions with special ctors
Sergio0694, Panda-Sharp and Kyaa-dost
Metadata
Metadata
Assignees
Labels
feature request 📬A request for new changes to improve functionalityA request for new changes to improve functionalityimprovements ✨