Skip to main content

Questions tagged [error-handling]

Questions related to handling errors and exceptions. According to Wikipedia, Exception handling is the process of responding to the occurrence, during computation, of exceptions – anomalous or exceptional events requiring special processing – often changing the normal flow of program execution. It is provided by specialized programming language constructs or computer hardware mechanisms.

2 votes
3 answers
183 views

Say I have the following header #ifndef WINDOW_HPP #define WINDOW_HPP // includes... namespace window { struct Window { GLFWwindow *handle = nullptr; }; struct ...
user avatar
29 votes
14 answers
11k views

I'm a junior in my company, and one of the coding rules they have is: "a constructor object must never fail" (i.e., never throw). So what if I give them an invalid parameter? Then, the ...
sayanel's user avatar
  • 509
0 votes
1 answer
172 views

Background I have a large C++ project which uses system error codes from errno.h, in C style. int Cls::foo(A arg, O* out) { if (!validate(arg)) return -EINVAL; if (!out) return -EINVAL; return 0;...
Abyx's user avatar
  • 1,445
2 votes
4 answers
494 views

We have a large(ish) real-time embedded system. It's VxWorks, if that makes any difference. It has some C code in DKMs, but is 95%+ in C++. It has absolutely no exception handling, nor Posix signal ...
Mawg's user avatar
  • 4,308
0 votes
2 answers
107 views

I am currently implementing a library in Rust that implements a proprietary serial protocol. The protocol specifies several enum values, that mostly are returned by the hardware as u8s (bytes), but ...
Richard Neumann's user avatar
1 vote
2 answers
281 views

I asked this questions on StackOverflow but it's definitely a bit too broad. Even for this website, although the question is about software design, it might not be enough "focused". I am ...
lux_piromani's user avatar
0 votes
1 answer
594 views

I have an endpoint in API 1 (my api) that queries API 2 (another companies api) to view and edit objects stored in API 2's database. API 1 is essentially acting as a wrapper service around API 2, ...
Hazzinator's user avatar
0 votes
1 answer
217 views

Imagine a simple set up of an API and a 2nd service, where the API pushes some msgs to the message queue and the service pulls them and processes them. Now, if an error occurs while processing a msg, ...
Milkncookiez's user avatar

15 30 50 per page
1
2 3 4 5
21