Software engineer sharing my thoughts
Hello world 👋, I'm a developer sharing my thoughts (📝) during my journey as a developer, consider subscribing so you can be notified once I shared anything.
Markdown supported · ⌘↵ to post
Great article, but there is another problem raised. That is you can't overwrite the error message..
Like when user query with invalid email address than he get an uncaught exception that you can't overwrite if you using this method.
Salah Assi
Well, congrats you got rid of try/catch but you got another issue which is you can't change either the error code or the error message. Basically, when you design a software to fullfil business needs, you need to be flexible, you should care about returning the right message and code more than using try/catch.
Thanks anyway 😅