Skip to main content

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
0 votes
0 answers
39 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 ...
KristalkillPlay's user avatar
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 ...
farhanhubble's user avatar
5 votes
2 answers
177 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 ...
jdc's user avatar
  • 153
6 votes
3 answers
246 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 ...
kiaora's user avatar
  • 141
0 votes
1 answer
90 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: ...
Jakub's user avatar
  • 11
0 votes
3 answers
180 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. ...
Somesh Diwan's user avatar
5 votes
1 answer
92 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 ...
kiaora's user avatar
  • 141
4 votes
1 answer
150 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? ...
the_humble_asker's user avatar
7 votes
1 answer
273 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 ...
HernanATN's user avatar
  • 369
11 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, ...
golgi apparatus's user avatar
4 votes
1 answer
102 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. ...
kiner_shah's user avatar
0 votes
0 answers
34 views

How to optimize authentication and authorization, API calls in a task management frontend application?

Let me give a brief explanation of the mini-application I've designed using Angular : A simple login page that requires user email and password as credentials. Once logged in, the user is moved to a ...
user285232's user avatar
3 votes
3 answers
737 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 ...
David Gard's user avatar
4 votes
3 answers
695 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 (...
Sai_krishna's user avatar
5 votes
2 answers
960 views

Simple load balancer

I would like to know the possible improvements in design and concurrency of the following load balancer: ability to add/register new instance keep max of 10 instances for load balancer forbid ...
tinyzero4's user avatar

15 30 50 per page
1
2 3 4 5
49