54,256 questions
-1
votes
0
answers
44
views
Infrastructure storage exception handling in DDD-ish app [closed]
I have a DDD-ish application where a long-running business process is split into workflow steps.
Each step is idempotent and starts from a message handler.
Very simplified flow of a single step:
...
Best practices
0
votes
3
replies
157
views
Can I modify the Message of a caught Delphi Exception object and then re-raise it?
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":...
1
vote
1
answer
55
views
how to make socket server propagate exceptions up to TaskGroup where they're started from?
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 ...
Advice
0
votes
2
replies
56
views
Better solutions for reseting 'is_running' flag to 0 when an exception occurs during code execution in python
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 ...
Advice
0
votes
0
replies
39
views
What should I replace a newline character with when newlines aren't allowed?
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 ...
4
votes
1
answer
102
views
Java ExecutorService detect asap thread fail
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 ...
2
votes
1
answer
49
views
Calling `sys.excepthook` manually with `sys.last_exc`
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, ...
Best practices
0
votes
1
replies
93
views
Java exception handling (best practices)
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 ...
-1
votes
1
answer
70
views
Why does asyncio.gather() sometimes hang indefinitely when one of the tasks raises an exception? [closed]
I'm experimenting with Python’s asyncio to run multiple coroutines concurrently.
However, in some cases asyncio.gather() seems to hang forever when one of the tasks raises an exception — even though I ...
0
votes
1
answer
115
views
Spring Boot 3.x — @RestControllerAdvice not catching custom exceptions
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")...
3
votes
1
answer
146
views
How to catch EXCEPTION_PRIV_INSTRUCTION from RDPMC directly in Assembly (and without SEH)?
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 ...
1
vote
0
answers
84
views
exception handling on different architectures
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 ...
0
votes
1
answer
59
views
WhenAll nested in WhenAny (or WhenAll with timeout) [duplicate]
The first exception does not block the execution:
public static async Task Main()
{
await Task.WhenAny(
Task.WhenAll(
Task.Run(() => throw new Exception(&...
1
vote
1
answer
71
views
How to handle error during customized scoped dependency injection
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 ...
3
votes
1
answer
427
views
Android project throws FileAnalysisException in onCreate method in Main Activity when adding OkHttp library
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 ...