Skip to main content
Filter by
Sorted by
Tagged with
Best practices
1 vote
8 replies
144 views

This question is brought about by the below examples. I have approached a couple of people for their opinions, but still would like some more help and context from the general community. Here is an ...
TKMitsu's user avatar
Best practices
0 votes
5 replies
87 views

Should I use custom exceptions in my library or just standard Python exceptions? I'm building a Python library for video processing and I'm uncertain about exception handling design. Specifically, I'm ...
qhuboo's user avatar
  • 47
1 vote
2 answers
186 views

Part of my code throws AccessViolationException; the code is not in my control; I cannot fix the problem. When this exception is thrown, my application crashes. I am working with Console application ...
Amit Joshi's user avatar
  • 16.6k
1 vote
1 answer
49 views

I'm writing a busfault handler for STM32-U5 which acc.to STM should be an Arm v8-M architecture. And acc.to Arm https://developer.arm.com/documentation/107706/0100/Exceptions-and-interrupts-overview/...
M Webjorn's user avatar
3 votes
2 answers
201 views

Suppose, I have a try/catch in the wWinMain() function, which calls some Windows API functions, e.g. CreateWindowExW(), GetMessageW(), TranslateMessage(), DispatchMessageW(). The Windows API will call ...
Dr. Gut's user avatar
  • 3,607
1 vote
1 answer
131 views

I'm experiencing a segmentation fault when trying to access exception details (e.what()) in a catch block after co_awaiting a coroutine that throws an exception. The exception is successfully caught, ...
Alex's user avatar
  • 99
0 votes
2 answers
209 views

I am looking for a custom LINQ operator here. I have an array of file paths and I want to find their common parent folder. In case the files are not located in the same folder, I want to throw an ...
Theodor Zoulias's user avatar
1 vote
1 answer
181 views

I'm working on a tool to segment features from a grey scale image and as part of this I want to perform a gaussian blur. This is basically a way of learning more about C# and the underling image ...
jasonisme84's user avatar
5 votes
2 answers
409 views

In my code, I have something like: try { do_stuff(); } catch(my_exception_class& e) { if (not can_ignore_exception(e)) { throw e; } log_or_do_nothing(e); } A static analyzer (...
einpoklum's user avatar
  • 139k
1 vote
1 answer
140 views

I have the following code to enhance a class-level exception with subclass information: class SomeClass: def __new__(cls): class ExWithClsInfo(RuntimeError): def __init__(self, ...
Wör Du Schnaffzig's user avatar
5 votes
1 answer
227 views

I am writing a client application using Java Swing. I am quite confused about how a launcher can capture JVM crash information when the JVM crashes. The hs_err_pid[PID].log file is not generated. I ...
Elijah's user avatar
  • 79
2 votes
2 answers
171 views

Is the following code valid in a C++ coroutine promise object? void promise_type::unhandled_exception() noexcept { try { // re-throw current exception throw; } catch (const std::exception &...
user3188445's user avatar
  • 5,186
-2 votes
1 answer
115 views

I have the following code in a CLI PHP script. (The value in $mime_encoded_text actually comes from a message header, but for the sake of clarity, I have simplified here) : $mime_encoded_text = "...
Dennis 's user avatar
  • 1,325
Best practices
0 votes
13 replies
6k views

I'm trying to implement these requirements: I have to execute functions i cannot modify. Unfortunately, the functions also needs a specific global state which needs to be set before calling the ...
ridilculous's user avatar
0 votes
1 answer
45 views

I am upgrading a rather big application from Spring Boot 2.7.18 to Spring Boot 3.5.6. In this application there is an ExceptionController which is intended to handle exceptions caused by non xhr ...
riskop's user avatar
  • 1,839
Best practices
0 votes
7 replies
203 views

import random number_to_guess = random.randint(1, 10) while True: guess = input("Guess a number between 1 and 10: ") # This crashes if 'guess' is not a number if int(guess) == ...
P Jaideep's user avatar
Best practices
1 vote
3 replies
192 views

The title says it, but here is an example: try // ... raise EFileNotFoundException.Create('File not found!'); except on E: EFileNotFoundException do begin E.Message := Format('"%s":...
T0mmiTheGreat's user avatar
1 vote
1 answer
72 views

How to make exceptions thrown from a socket server running in a task group task be propagated up to its parent TaskGroup? With given example, I'd expect to see the error raised from ...
laur's user avatar
  • 607
Advice
0 votes
2 replies
59 views

I have a python code with below structure: try: # Check if ETL is running check_isrunning_sms_journals = "select nvl(d.is_running,0) as is_running from running_etl_table d where ...
Pantea's user avatar
  • 251
Advice
0 votes
0 replies
46 views

I'm building a hobby chess engine that communicates through the UCI protocol. This is communication done through standard out/in of the program, with each line representing a single command. One of ...
Kyle Pollard's user avatar
  • 2,362
4 votes
1 answer
161 views

I have to run x asynchronous threads , which can last several minutes each. They ALL have to terminate properly without exceptions. If one fails I have to stop them all immediately and not wait ...
MaxSan's user avatar
  • 51
2 votes
1 answer
70 views

The signature of sys.excepthook is sys.excepthook(type, value, traceback) so a natural way to call it is sys.excepthook(sys.exc_type, sys.exc_value, sys.exc_traceback) But as of Python 3.12, ...
Kodiologist's user avatar
  • 3,557
Best practices
0 votes
0 replies
103 views

I'm starting out with Java and Spring Boot, and I have a fairly simple question that always raises doubts for me, as I always like to follow best practices. I have a Controller layer where I create ...
Sergio Cea's user avatar
0 votes
1 answer
188 views

I recently upgraded to Spring Boot 3.5 (Jakarta packages) and noticed my global exception handler isn’t being triggered. @RestController public class UserController { @GetMapping("/test")...
Lavi Kumar's user avatar
3 votes
1 answer
175 views

I'm experimenting with measuring CPU's instructions latency and throughput on P and E cores using RDPMC on Win 11, something like that: MOV ECX, 0x40000000 ; Instructions Counter RDPMC ; Read ...
Andrey Dmitriev's user avatar
1 vote
0 answers
100 views

I have two questions about exception handling. I read exception handling code of some real-time operating system (I mean assembly code). I note that on some architectures we allocate on stack more ...
chav1s's user avatar
  • 41
0 votes
1 answer
67 views

The first exception does not block the execution: public static async Task Main() { await Task.WhenAny( Task.WhenAll( Task.Run(() => throw new Exception(&...
user26757851's user avatar
1 vote
1 answer
83 views

I have applied the multi-tenant location for EF Core database applying customize schema per tenant in my ASP.NET Core Web API project. To do that the client send request through the API by setting ...
Yoann Blossier's user avatar
3 votes
1 answer
1k views

I've created an Empty Views Activity project in Android Studio, but as soon as I add the dependency in build.gradle.kts and try to launch the app, it throws an exception (see output). No code is ...
Beavis's user avatar
  • 33
0 votes
1 answer
202 views

I wanted to learn game dev in C++ lately, so I decided to setup raylib in Visal Studio 2022 by following a tutorial online. I downloaded the latest release from the raylib github repo and configured ...
Aayan Tanvir's user avatar
1 vote
1 answer
142 views

I'm working through Bjarne Stroustrup's "Programming: Principles and Practice Using C++" and using the PPP_support.h file from the official website https://www.stroustrup.com/PPP_support.h I ...
Khavin S's user avatar
1 vote
1 answer
154 views

Consider these two functions: int foo(std::array<int, 10> const& v) { auto const w = v; int s{}; for (int i = 0; i < v.size(); ++i) { s += (i % 2 == 0 ? v : w)[i]; ...
Enlico's user avatar
  • 30.8k
0 votes
1 answer
766 views

I tried to use DDGS to search for images in Jupyter Notebook with fastai, but the search seems to be not very stable. Most of time there turned out to be an ERROR:DDGSException: No results found.I ...
Alex YAN's user avatar
0 votes
1 answer
87 views

I'm trying to perform a misaligned memory read / write and catch it inside a __try and __except block. After setting the RFLAGS.AC bit to 1, I perform the misaligned read which causes my program to ...
trapstar's user avatar
1 vote
2 answers
85 views

I am trying to combine Option.defaultValue with failWith to get exception for None values: printf "%A" (Some 1 |> Option.defaultValue (failwith "Error")) But this code raise ...
Andrey's user avatar
  • 6,659
1 vote
0 answers
78 views

I'm integrating the LINE messaging API with bot server. Likewise the Whatsapp Business API. To create the public URL, I used ngrok. Now whenever the user send the message to us, the LINE server send ...
Muhammad Faiz Raza's user avatar
4 votes
0 answers
131 views

For debugging purposes, I would like to log the exception that is causing stack unwinding that lead to destruction of specific object. Something like this (pseudocode, obviously insufficient and not ...
Igor G's user avatar
  • 2,768
1 vote
1 answer
160 views

Exception: Module loading logistics failed: file logistics/security/ir.model.access.csv could not be processed: No matching record found for external id 'model_logistics_order' in field 'Model' No ...
Anton's user avatar
  • 133
0 votes
1 answer
76 views

I have an URL for file downloading and it works perfectly on my Samsung Galaxy S10 (running Android 12), but the same app throws java.io.FileNotFoundException on my Google Pixel 9 with the latest ...
zkminusck's user avatar
  • 1,238
0 votes
1 answer
64 views

Is it possible that pathlib.Path().is_file() returns True and the file is nevertheless not readable, i.e., open('foo', 'r') raises an IOError?
fsdfsdfsdfsdfsdf's user avatar
0 votes
0 answers
50 views

I am unable to move the next statement pointer in VS2022 outside the catch block if an Exception is thrown. If I run this code in a VS2022 (17.14.4) Unit Test Project (.Net 4.81), set a break point on ...
RESC's user avatar
  • 1
1 vote
0 answers
136 views

I'm working on a gRPC client that continuously streams data (such as images) from a server. I use a CancellationToken to stop the stream when needed. While cancellation works, I consistently see ...
Sumit Anand's user avatar
0 votes
1 answer
90 views

I have set up a very simple Java web project (using NetBeans' Web Application template). It is deployed on Payara 6.2025.7 with a H2 database as a JTA data source. I can't get EntityExistsException ...
zajer's user avatar
  • 846
1 vote
1 answer
134 views

I have a Python script using asyncio (for Telethon) and until recently, it was running just fine in a Terminal inside VSCode. However, an extension install prompted a VSCode restart and now I can't ...
Sora.'s user avatar
  • 1,495
1 vote
1 answer
79 views

I often see code like this: try: some_operation() except Exception: logger.error("An error occurred while running the operation") raise Exception("A custom message") ...
Jakub Małecki's user avatar
1 vote
1 answer
136 views

I'm trying to implement a basic database web application in Netbeans using Java Server Faces and a Java Database. But whenever I try to deploy the application, I get the following error message: ...
William Rave's user avatar
0 votes
1 answer
243 views

I have the following configuration: spring-boot-starter-parent: 3.4.7 spring-boot-starter-web (excluding spring-boot-starter-tomcat in order to have netty instead Tomcat) spring-boot-starter-webflux` ...
Carlos's user avatar
  • 1
0 votes
0 answers
79 views

I am trying to catch an exception and get the line and source file where the error occurred. I was using __throwLineNumber and __throwFileName and it compiles, but I am receiving linker errors: [...
user6604390's user avatar
0 votes
1 answer
226 views

I am getting a memory exception in (unchanged) code that has been working for 2+ years (code is unchanged, in a Git repo). Here's the code that is causing the exception: HTREEITEM getTreeNode(HWND ...
John D's user avatar
  • 11
2 votes
1 answer
588 views

I'm trying to fetch data using Algolia Search in Flutter and the data does get fetched the problem is that it gives the following error: DioException (DioException [connection timeout]: The request ...
Ayesha Arshad's user avatar

1
2 3 4 5
1085