Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

After submission if there are any error, on user inputfield typing wants to remove that error. My Approach. ...
Devang Gondaliya's user avatar
1 vote
0 answers
140 views

Background I am building a complex, standalone class. It has a property called .Mapping, which should behave like a Dictionary. ...
Greg's user avatar
  • 569
1 vote
3 answers
158 views

This is the code. I'm uncertain about the last block. ...
yoda's user avatar
  • 277
1 vote
0 answers
55 views

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

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
201 views

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
276 views

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
109 views

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
238 views

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's user avatar
  • 11
5 votes
1 answer
104 views

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
176 views

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
314 views

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
12 votes
2 answers
2k views

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
132 views

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
3 votes
3 answers
773 views

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
724 views

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
983 views

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
4 votes
3 answers
858 views

strscpy() is similar to the standard strncpy() except that it always writes a valid null-terminated string (unless ...
ismbks's user avatar
  • 75
3 votes
2 answers
100 views

I am writing a crawler that is going to end up in production and I was trying to come up with a way to validate its page visits. It scrapes asp.net pages so each scraping process involves a few ...
Gustavo Costa's user avatar
2 votes
1 answer
123 views

This is a revision of the previous question. I was told to ask an additional question with more context for the modified code to be reviewed. The changes: changed from ...
digito_evo's user avatar
5 votes
1 answer
348 views

I've come up with a type that allows me to encapsulate any container class (that supports std::pmr::polymorphic_allocator<T>) with a buffer and a memory ...
digito_evo's user avatar
3 votes
1 answer
210 views

I have written the below small program that tries to initialize a tzdb before the main() runs. So once the main function runs, it checks the two global variables (...
digito_evo's user avatar
3 votes
1 answer
110 views

Summary: The code scrapes the website and collects the data to store it in CSV. It also downloads selected information that is available for download in PDF format. The details and the entire code are ...
sangharsh's user avatar
  • 269
2 votes
2 answers
237 views

I wrote this to check files for successful compression with LZ4. Any advice is welcome. Particularly regarding raising exceptions and error handling. ...
voices's user avatar
  • 767
2 votes
1 answer
78 views

Background and use-case I need to create a stored procedure where the input parameters will be: @sourceTable, @targetTable, @compositeKey. I'm using available fields for the composite key, since I ...
William's user avatar
  • 21
4 votes
2 answers
129 views

I'm coding a chat application from scratch in modern C++. I'm currently building an interface for interacting with sockets. I want it to be cross platform. Am I approaching platform independence ...
Cherestes Radu's user avatar
2 votes
3 answers
2k views

Context- CRM system, front-end form. Requirement- Within a form users have to give a rating to a section based on user inputs, each rating has different weighting. The rating is stored in an option ...
BenDev21's user avatar
1 vote
1 answer
215 views

Greetings One small problem that anyone have to tackle with in Python is handling invalid argument types ( without an automatic static type checking tool like Mypy ) One of the best methods for ...
KhodeNima's user avatar
  • 419
4 votes
2 answers
218 views

This is my attempt at making a basic TicTacToe game to play against another human player or a computer controlled opponent. The project was a lot harder for me than I initially thought it would be! I ...
Reslashd's user avatar
2 votes
3 answers
226 views

In our apps we're using a shared inhouse library which provides filesystem functions. All the functions are noexcept. In several apps i found that similar or identical error return translations are ...
ridilculous's user avatar
5 votes
2 answers
297 views

I'm working with Kotlin for some time. Compared to Java it's more concise. Still it has some legacy inherited from Java. For example the try-catch-construct. Though it has been upgraded from a ...
LuCio's user avatar
  • 183
3 votes
2 answers
512 views

I have a piece of equipment that I am interacting with. The manufacturer provided an SDK and some simple examples of how to interact with the device. However, I need to write an API for interacting ...
Michael's user avatar
  • 303
0 votes
1 answer
230 views

Can you tear my code apart with code review comments? Below is a simple method which reads an XLSX file and does some stuff with it. I use FileInputStream and ...
AutoTester999's user avatar
1 vote
1 answer
149 views

I'd like to show you two versions of my two functions that support my logging tools. Their purpose is to log a different message (here abort) when an error occured ...
t3chb0t's user avatar
  • 44.7k
1 vote
1 answer
95 views

Whilst developing a bigger project, I was in need of having basic error handling inside the context of a C interface. I came up with the following solution. ...
Sam Coutteau's user avatar
3 votes
1 answer
260 views

Introduction I have written a Python class which uses the module ftplib. In this class I have created a private method called <...
User051209's user avatar
3 votes
1 answer
116 views

I want to add an error reporting feature to my WPF app. I have the view for it created; I just need to know when to call it. I am used to web development and this is my first WPF app. ...
Henners2002's user avatar
2 votes
1 answer
279 views

I have been learning rust sporadically for a while now and decided to write some toy projects. While browsing https://github.com/codecrafters-io/build-your-own-x I came across some bittorrent client ...
Hakan Sonmez's user avatar
2 votes
1 answer
135 views

I'm creating a little library for my pet project that is inspired by Boost's outcome namespace. The main reason why I didn't want to use the Boost version is that I don't like the overhead of ...
Goubermouche's user avatar
2 votes
1 answer
178 views

I had a Tic Tac Toe assignment for class and the program seems to work fine but I feel like the exception/input handling could be done in a much better way. Is this a good way to approach the ...
Drosos-kal's user avatar
-3 votes
1 answer
109 views

Say I have a framework, which should catch any exceptions raised from user code, and actually do something with it, such as converting it to a return value ...
user877329's user avatar
6 votes
1 answer
514 views

I want to write on failure to either STDOUT or STDERR a clean, simple error message for the user, without the (verbose) ...
Timur Shtatland's user avatar
3 votes
2 answers
357 views

This here is the follow-up to this question. I was recommended to implement a Lockable type (similar to std::mutex) that can work with ...
digito_evo's user avatar
1 vote
1 answer
420 views

Pandas likes to throw cryptic errors when you feed its functions with empty DataFrames saying nothing that would help you to identify the root cause. In order to ...
t3chb0t's user avatar
  • 44.7k
1 vote
1 answer
252 views

I'm reworking a set of two functions that return a text file name, constructed from a string argument and string variables from a module called inventory. It seems ...
Dan's user avatar
  • 301
3 votes
1 answer
91 views

Although throwing excptions for control flow is a controversial topic there are some quite popular examples of using this anti-pattern like C#'s async routines throwing the ...
t3chb0t's user avatar
  • 44.7k
5 votes
4 answers
4k views

I am new to coding, I hope you can help me to improve my code :) First of all: The code works correctly. ...
jasmine's user avatar
  • 53
7 votes
2 answers
860 views

I have written the following simple scoped timer struct in order to help me measure the execution time of arbitrary scopes. Here is the code (live): ...
digito_evo's user avatar
3 votes
2 answers
157 views

I'm writing a simple online shop using spring boot, for learning purposes. Right now I have purchasing-service and a product-service. The purchasing-service makes requests to the product-service via ...
Eoin's user avatar
  • 263
2 votes
4 answers
642 views

I have a code block that imports CSV to list and map to a database. And there are few validations and I've to return error messages based on those validations. Right now all those logic is handled by ...
Optimus's user avatar
  • 131

1
2 3 4 5
17