Another example of writing error handling

edit: on second thought you can also (and usually do) throw objects so maybe we should put it under Introducing JavaScript objects

so, it’s kind of tricky question where to put it…

maybe we can explain it under JavaScript building blocks (without throwing objects) and mention it again (with objects) under Introducing JavaScript objects


Hi @chrisdavidmills,
I think the appropriate place to put error handling in JS is here:

try…catch in my option is part of control flow and you also have to know what is function for this