The simplicity of this statement is that you are trying to do something and figure out what went wrong.

try {

// Try to do something

}

catch {

// What went wrong?

}

The part not listed is the finally clause, which sometimes I think should be called “Again” as in – try again, don’t give up – don’t stop.

It’s like the teacher saying “Again.  Again. Again” – until you have it right.

Want more? Check out my book Code Your Way Up – available as an eBook or Paperback on Amazon (CAN and US).  I’m also the co-host of the Remotely Prepared podcast.

Author

Write A Comment