Earlier quoted context omitted.
I don't. Exceptions in general FORCE a developer to deal with the problem. They can slap a developer in the face if they're abusing the API. Error codes on the other hand can be ignored. PutLionInCage(); PokeLionWithStick(); I'd rather PutLionInCage() throws if there is a problem.
If you need an exception here, you're just a bad programmer. It's your fault you didn't explicitly check that the lock was functional before poking that lion! /s
If you write a library are you thinking that everyone is going to use it properly?
My point is that exceptions help people to learn how to use APIs (its kinda like documentation that appears through use!) and exceptions make things _safer_.
I appreciate you could write the above in two try catches but my point is that it would look more wrong. The code above _looks_ fine and that's my point.