Questions tagged [error-handling]

The various techniques used for maintaining stable program state in circumstances that, if not taken care of ("handled"), could cause serious issues, including logical bugs and abrupt execution termination.

Filter by
Sorted by
Tagged with
8
votes
5answers
5k views

Aborting a program for invalid floating-point input

My friend does a bunch of Java work (commandline, still toying around) and I notice a bunch of try/catch blocks like this: ...
13
votes
2answers
7k views

Handling many networking exceptions in Ruby

What would be a prettier/faster way to do handling of multiple errors in Ruby? Here is the code I am working with: ...
9
votes
5answers
3k views

Providing unchecked exception “wrapper” interfaces for an API with checked exceptions

I recently had a discussion in the forum of an API, because they changed an exception from checked to unchecked. I believed it needs to be checked, because it is recoverable. The arguments of "the ...
3
votes
2answers
981 views

abort() implementation

Here you go: #define abort(msg) (fprintf(stderr, msg) && *((char*)0))
14
votes
2answers
302 views

Executing a program with a temporary directory and measuring the running time

I need a code review for best practices and code correctness of the following piece of code. run executes a program and validates in output. If the output is valid ...
6
votes
2answers
438 views

User error logging

I have created this code for user error logging, and I am wondering if there is anything that can be improved. The point is that this error handler would ONLY catch user errors created in-code by ...
38
votes
6answers
3k views

Resolving a link

How can I clean this up? ...

1
12 13 14 15
16