Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Posts tagged exception

For questions dealing with exceptions, atypical conditions that require deviation from the program's normal flow. Typically, exceptions are handled by exception handlers, preventing application failure.

This tag doesn't have a detailed wiki yet.

66%
+4 −1
Q&A How to provide additional information when raising exception

MWE filename = "bad_dir" print(f"File not found: {filename}.") raise(FileNotFoundError) Question How do I raise an exception while adding additional information? In the example above, the...

1 answer  ·  posted 8mo ago by young_souvlaki‭  ·  last activity 8mo ago by Alexei‭

Question python exception
75%
+4 −0
Q&A Measuring the impact of using exceptions instead of return values in an ASP.NET Core application

Context This Q&A from SO suggests that throwing exceptions is incredibly expensive when compared to returning values (return codes): that with return codes instead of exceptions the same pr...

1 answer  ·  posted 1y ago by Alexei‭  ·  last activity 1y ago by Dirk Herrmann‭

75%
+7 −1
Q&A How to avoid "exception is never thrown" when commenting out a line while debugging

I have a code block like this: try { ... x.foo(); // This is the line that forces us to have the try block ... } catch (ArrayIndexOutOfBoundsException e) { logger.error(e.getM...

1 answer  ·  posted 1y ago by klutt‭  ·  last activity 1y ago by anatolyg‭

Question java exception
81%
+7 −0
Q&A Multiple catches with almost the same code.

I find myself often writing code like this. try { // code } catch( FailedReadException const & ex) { file.close(); std::cerr << "Read failure " << ex.readFailure() <&...

2 answers  ·  posted 2y ago by Estela‭  ·  edited 2y ago by Ayxan Haqverdili‭