New answers tagged error-handling
8
votes
Accepted
Is throwing an error in programming is good Idea at all?
When you say 'throwing errors' I think you are talking about what most people call 'exceptions'. The wisdom of exceptions is regularly debated. One of the founders of this website has an old article ...
1
vote
Is throwing an error in programming is good Idea at all?
Its better to throw the exception because that is the built in way of returning an error response.
Say you return an error json as you suggest. Then my code has to be..
var result = library.DoThing();
...
2
votes
Error codes in a legacy C++ project
First of all: why you reuse system error codes? There's even more weirdness in your code with - sign.
So the first step to improve your situation is to introduce your own error codes:
const int ...
Top 50 recent answers are included
Related Tags
error-handling × 305exceptions × 69
design × 29
c# × 27
c++ × 22
design-patterns × 21
error-messages × 21
programming-practices × 19
java × 18
php × 17
c × 17
api-design × 15
javascript × 13
api × 13
coding-style × 13
errors × 13
http × 10
error-detection × 10
python × 9
libraries × 9
microservices × 8
rest × 7
.net × 7
language-agnostic × 7
architecture × 6