Skip to content

Latest commit

 

History

History
16 lines (15 loc) · 670 Bytes

README.md

File metadata and controls

16 lines (15 loc) · 670 Bytes

ExFunc

This is a framework to group Exceptions. Intead of catch each excpetion and have redundant code within them you can with this framework group them and perform actions.

         var a = new Foo();
        
          Do.Try(() => a.ExecuteFoo(3))
                       .Catch<ArgumentException>()
                       .OrCatch<EntryPointNotFoundException>()
                       .OrCatch<ArgumentException>()
                       .ThenReturn((x) => { throw (Exception)x; })
                       .Catch<ArithmeticException>()
                       .ThenReturn((x) => "Hello ArithmeticException")
                       .Run();