Skip to content

jnormen/ExFunc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages