I see many issues with this. First is, that it will navigate to a new site while you are debugging the application. That means, that any stack-traces and variable values are LOST. You don't know why an exception occurred. Also, maybe you already know why an exception occurred and how to solve it, but the above code will interrupt your work and concentration. It's annoying. To top it of, the code above is not production-ready. You would instantly lose your users if all they do is encounter a little throw. By the way, removing them is tedious extra work, you might forget some and you have to write better error handling either way, so why even bother doing this?
The correct way to do error management is to handle an error gracefully. Your application should log the error on your server, try to recover from the error by inspecting it, and if it's not something it can recover from by itself display a nice message to the user explaining what kind of error happened and what kind of steps they might take in order to fix it or report it so that it is tracked and can be fixed.
Additionally, try..catch is a bad way to handle any error, as it always leads to a stack-unwind and has to be handled in a side-channel, secluded from your code flow. That's why, imho, monadic results should be used. They offer a better handling-mentality, superior speed in case of automatic resolution and can unwind the stack, if it is necessary, however, that will be part of your code flow and a conscious decision you make, not some magic happening.
Be prepared... things are on its way... stackoverflowify.com (currently not even a website on it) but wait for it! :D
No One
code monkey
I sent this round to our team #slack and I got lots of these back -
ಠ_ಠ