You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- There's one bad consequence, at least in languages providing a full stack trace. As the code is heavily optimized with a lot of inlining, the real stack trace and the one a developer wants to see differ a lot and therefore the stack trace generation is costly. Overusing exceptions is very bad for performance in such languages (Java, C#).maaartinus– maaartinus2017-01-06 04:03:00 +00:00Commented Jan 6, 2017 at 4:03
- "It's a poor way to do things" - Shouldn't that be enough to classify it as an anti-pattern?Maybe_Factor– Maybe_Factor2018-04-05 06:30:01 +00:00Commented Apr 5, 2018 at 6:30
- 1@Maybe_Factor Per the definition of an ant-pattern, no.MirroredFate– MirroredFate2018-04-06 17:31:11 +00:00Commented Apr 6, 2018 at 17:31
- @MirroredFate i like how you separated the problem it solves from the negatives. i think this is a pretty good. except for the last section about anti-pattern. you could mention lower performance as a negative consequence. you could also give a concrete example of exception as control flow, so that we are all on the same page. you could even give an example of exceptions fixing the the arrow anti-pattern, before the last sectionsymbiont– symbiont2022-11-17 08:09:47 +00:00Commented Nov 17, 2022 at 8:09
- There are two exceptions, low level and high-level. A low level exception is one thrown by a file or keyboard io function further down the stack, for instance. A high level one catches a lower level one and rethrows it as is, or rethrows it with a more specific or detailed message which can be presented to the user. High level exceptions can be abused, but they are the best way of meaningfully reporting errors.user148298– user1482982023-08-13 03:44:32 +00:00Commented Aug 13, 2023 at 3:44
Add a comment |
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you