Re:I got asked LeetCode questions for a dev-ops systems engi...
by dragonwriter on Tuesday June 18, 2019 @10:02AM
(#20213054)
The catch block merely does exactly what the loop would do at the end end anyway; it's no different than:
(That is, if the pseudocode isn't making a Rubyish distinction between exception handling and control flow [rescue vs. catch] it's just an extremely verbose way of silently swallowing exceptions, and if it is making a Rubyish distinction it's an extremely verbose way of doing nothing and the whole try/catch construct is unnecessary.)
[ Parent
| on HN ]