I am a software engineer currently working @ShopPad, previously @HPE. I like to build websites and web application in PHP, JavaScript, and Golang. I have an unhealthy obsession with Mexican food (🌯)
The problem with relying only on if/else without using try/catch is that it creates a lot of unnecessary code when you are trying to handle errors. With try/catch you can have multiple functions inside of a try and gracefully handle any errors in the catch.
A good example is Golang, does not have try/catch and most of the code is checking if a function it's returning an error or not.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The problem with relying only on if/else without using try/catch is that it creates a lot of unnecessary code when you are trying to handle errors. With try/catch you can have multiple functions inside of a try and gracefully handle any errors in the catch.
A good example is Golang, does not have try/catch and most of the code is checking if a function it's returning an error or not.