Skip to content

Exception Driven Development, i.e. invoke methods by throwing exceptions around. I know, it's crazy.

License

Notifications You must be signed in to change notification settings

tjeerdhans/exceptiondriven

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exception Driven Development

Watch a lightning talk about Exception Driven Development at https://www.infoq.com/presentations/joy-coding-2018-lightning-talks

This is Hello World, run by exception.

In other words, it throws exceptions around in order to invoke methods. I know, it's exceptionally crazy.

How to

To invoke a method, throw a MethodInvocation, containing the target class, method and (optional) parameters, e.g.:

throw new MethodInvocation("ExceptionDriven.ConsoleApp.Worker", "Greet");

If you'd like to use an instance as the target class, then supply that one:

throw new MethodInvocation(this, "SayHello", name);

Don't expect the called method to return to the location you threw it from. That's not how Exception Driven Development rolls.

About

Exception Driven Development, i.e. invoke methods by throwing exceptions around. I know, it's crazy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages