ElemarJR.FunctionalCSharp icon indicating copy to clipboard operation
ElemarJR.FunctionalCSharp copied to clipboard

Add support to multiple possible exceptions on Try type

Open marcellalves opened this issue 4 years ago • 0 comments

I'm using this library for the first time, to use checked exceptions like Java´s, but I´m not able to add more than one possible exception.

In Java I can define a method's interface like this:

public Position<T> Parent(Position<T> v) throws InvalidPositionException, BoundaryViolationException;

But in C# using the FucntionalCSharp library, I'm not able to do this:

Try<InvalidPositionException, BoundaryViolationException, IPosition<T>> Parent(IPosition<T> value);

Do you think this would be a good addition? Please, let me know and if it is, I can work on a pull request to implement this feature.

marcellalves avatar Oct 28 '19 01:10 marcellalves