4 ms·
I do not find it incorrect at all, as a Ruby user since 2004. A lot of gems use exceptions for control flow and it is also common in apps or libraries I've writ
by thibaut_barrere 3y ago
I do not find it incorrect at all, as a Ruby user since 2004. A lot of gems use exceptions for control flow and it is also common in apps or libraries I've written or maintained (just a data point).
- lcnPylGDnU4H9OF 3y ago> A lot of gems use exceptions for control flow Do you happen to have an example of such control flow to link to? Not that I don't believe you but I wonder if there's a difference in what is meant by "control flow" between commenters. begin do_stuff! rescue MyFirstLibraryError => error # handle first rescue MySecondLibraryError => error # handle second end That could be "control flow" to one person and "error handling" to another. Or even both to a third person.