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.
830 questions
1
vote
0
answers
112
views
Collection Utilities for VBA
Background
I am building a complex, standalone class. It has a property called .Mapping, which should behave like a Dictionary.
...
1
vote
3
answers
144
views
Is this exception handling missing anything?
This is the code. I'm uncertain about the last block.
...
1
vote
0
answers
47
views
Typescript robust Fetch wrapper with Retry and Error handling
I am building a TS wrapper around the fetch that adds automatic retries for certain errors. The error handling using a custom ApiError class and maps various error ...
8
votes
4
answers
1k
views
Python Exception Monitor
I have built a data pipeline in Python (3.12). It typically processes hundreds of thousands of files and runs for several days. A particular pipeline function calls external web APIs that sometimes ...
5
votes
2
answers
183
views
Design By Contract Library in C++
I asked this question on StackOverflow, and got exactly the answer I needed at the time. I am now here to ask - Is this a good design?
The motivation for writing up this library: my shop writes ...
6
votes
3
answers
269
views
GitHub Label Management with GraphQL, Requests, and Loguru
I've developed a Python script that automates the management of GitHub labels. It utilizes both the GitHub GraphQL API (to fetch label data) and the REST API (to update, delete, and merge labels). The ...
0
votes
1
answer
98
views
Implementing safe custom exception [closed]
I was trying to come up with some design to subclass built-in exceptions.
For simplest case I used something like this:
...
0
votes
3
answers
204
views
Java exceptions that show the message when converted to String
I’m working with custom exceptions in Java for stack operations. However, I’m unsure if the exception handling is being handled properly, especially in terms of how exceptions are thrown and caught. ...
5
votes
1
answer
97
views
Find food related words in German: Seeking Feedback on Concurrency and Code Organization
I'm developing a pipeline that processes unknown ingredient data from the OpenFoodFacts API. The goal is to find valid German words that are not yet in their taxonomy.
The tool performs the following ...
4
votes
1
answer
163
views
Replace node type in Drupal
In Drupal 11 or greater, this code is used to change the node type of a node. How would you improve the code if at all?
...
7
votes
1
answer
302
views
Errors as values and Generic Option, Result types in C++
I wanted to get an in-depth view of both Templates and Concepts in C++, so I made this library. https://github.com/Hernanatn/errores--
I'd like to ask:
is this a proper use of concepts?
is the code ...
12
votes
2
answers
2k
views
Robust error handling mechanism in C++ (safer than std::expected)
I've been looking into and experimenting with various paradigms for error handling in C++.
My goals for a robust error handling mechanism would be:
Enforce handling the error cases (in other words, ...
4
votes
1
answer
110
views
Result class to get either value or error
Recently, I had written a Result class. Basically I wanted a function to return result value on success and some error code on failure.
...
3
votes
3
answers
745
views
Capture multiple errors before raising an exception
I have a scenario where I need to store values from some environment variables (names of which I cannot control). My first run at this was pretty basic, however this is not usable as an exception ...
4
votes
3
answers
714
views
Error handling for singly linked list in C
I have seen many list implementations in C in this site; I know its been asked many times. I need some advice regarding:
Quality of my code, especially my list library.
How to handle errors in main (...