Ternary-like try/catch

The main issue with this idea is that it encourages the bad programming practice of "catching all errors, including actual bugs", instead of "catching just the specific error you're expecting and rethrowing all others".

There have been a couple of ideas floating around on these forms to provide a try-catch shorthand for catching specific errors and handling them. See here or here.

2 Likes