[misc] Avoid producing too much useless exceptions