Yoda exception handling is a coding paradigm. It’s a method of handling exception in a program. Simply put any section of code that might throw an exception is not dealt with. You just use no try blocks. Your code must “do or do not there is no try”. You can’t for example use the following.

try{
code here
}
catch(Exception e){}

It can be implemented in several programming languages. C++ and Java are the two best examples. The drawback of this method is your code only works when everything is running perfectly. But the time saved in coding and saying you're following in the footsteps of your Jedi hero Yoda make it a valuable tool.

Log in or register to write something here or to contact authors.