Wrap your whole code in try-catch, then you're back to the original problem of wondering where the error occurred
Use a ton of try-catches, which adds code complexity and is cluttered
Sometimes you can get a nice balance, but the point is that it shouldn't need to take extra steps to get detailed and actionable error information in a programming language.
Usabilty Engineer and JavaScript/TypeScript Developer.
On the path to become a Clean Code Developer.
Also rediscovering OOP-Principals and Design-Patterns.
Gotta love people starting off with a variant of "actually it's simple" - be it about politics, economics, world events or programming, grab your popcorn because they're about to make a fool of themselves.
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.
Simple:
Try-catch basically gives you two options:
Sometimes you can get a nice balance, but the point is that it shouldn't need to take extra steps to get detailed and actionable error information in a programming language.
The second one is what I do when coding in C.
+1 for writing code that won't even parse
Gotta love people starting off with a variant of "actually it's simple" - be it about politics, economics, world events or programming, grab your popcorn because they're about to make a fool of themselves.