Timeline for Check if resource exists before inserting to the database or wait until the DAO throw the Exception?
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 7, 2019 at 16:43 | comment | added | Deduplicator | @TMN For arbitrary control-flow, and unexceptional situations, yes, exceptions are generally the wrong tool. Still, there are languages and implementations where exceptions are business-as-usual, instead of an exception. | |
| Jan 7, 2019 at 16:17 | comment | added | TMN | @Deduplicator: Using exceptions for control flow makes it very difficult to reason about the behavior of the code, and makes it almost impossible for optimizers to do their job -- not just on the code in question, but any code that invokes it. | |
| Dec 18, 2018 at 17:14 | comment | added | Deduplicator | @MatheusCirillo Using exceptions for control-flow might have significant cost or not, depending on language and implementation. Still, whether you use exceptions for handling errors doesn't seem the most important point. | |
| Dec 17, 2018 at 17:01 | comment | added | Matheus | Well, that's a great point. Not use exceptions as a flow-control. Thank you! | |
| Dec 17, 2018 at 17:00 | vote | accept | Matheus | ||
| Dec 17, 2018 at 17:00 | history | answered | TMN | CC BY-SA 4.0 |