Skip to main content
2 votes
0 answers
156 views

I have a program that works as expected if compiled by GCC, but behaves weirdly after porting to Visual Studio. The program throws an exception from noexcept(false) destructor (I know that it is a bad ...
Fedor's user avatar
  • 25.7k
3 votes
1 answer
168 views

My program changed its behavior after updating Visual Studio to the latest version (2026). Simplifying it, I got the following minimal example, which contains a ternary operator with a throw in ...
Fedor's user avatar
  • 25.7k
0 votes
1 answer
36 views

I have set the compile option requireReturnValues="Error". I tried to compile the following example code but it doesn't pass the option: METHOD PUBLIC LOGICAL checkValue(i_cValue AS CHAR): ...
W0lfw00ds's user avatar
  • 2,138
4 votes
1 answer
400 views

The problem Using static_assert to generate compile-time error is not always easy because it requires a constant expression as first argument. I found, on StackOverflow, several example where throw ...
Oersted's user avatar
  • 4,928
2 votes
1 answer
168 views

Example: int foo() { throw 0; } int bar() { foo(); } foo here doesn't get a warning, while bar gets the error "must return a value". More typically, bar would have some return statements ...
H.v.M.'s user avatar
  • 1,746
-3 votes
1 answer
89 views

Is this throw statement even reachable? It's not showing as unreachable by compiler. public static async Task<List<string>> GetSomething(int id) { using (DbContext context = new ...
Chris Hayes's user avatar
  • 4,035
0 votes
0 answers
247 views

I have multiple layers of nested stored procedures, each with a try...catch block within them. However, I want each of these nested stored procedures to be able to properly run their own transaction ...
Leah's user avatar
  • 355
0 votes
1 answer
58 views

I have a Blazor Hosted WebAssembly app written on .NET8, so there are three projects Client, Server and the Shared. Intercommunication happends with Web API calls. In my razor components I have the ...
Stavros Koureas's user avatar
2 votes
2 answers
67 views

I found what I'd imagine to be a useful function in the illustrious async library that allows a thread to propagate an exception if and only if the exception passes a predicate - with a type of ...
Athan Clark's user avatar
  • 3,988
0 votes
1 answer
123 views

I am currently working with Apache Camel in Quarkus and I need to catch an exception of the following type using throw, so that the class that calls it can handle it: java.lang.Exception: Input byte ...
Cesar Justo's user avatar
-1 votes
2 answers
145 views

I know existence of a throw inside of a promise, change the state of that specific promise to rejected and the result will be the error message, but when I type this throw inside of a setTimeout ...
lome1446's user avatar
1 vote
1 answer
60 views

I have the code below and I expect to first have hi in my console then the error and at the end why, but the result is: hi, then why and the last one is error, so I'm wondering, why is this happening? ...
lome1446's user avatar
0 votes
1 answer
92 views

I had a situation like code below and since it's an arrow function and for a single line of code in arrow functions , no curly braces are required, I didn't use that and It works just fine. const test ...
lome1446's user avatar
1 vote
1 answer
666 views

I'm still new to the C++ programming language, and I'm trying to learn new things. I'm implementing a very very basic iterator/reverse_iterator classes and other standard library containers. I see in ...
user11611653's user avatar
-2 votes
1 answer
339 views

I have a do catch block with a function inside that can throw. In the catch block I throw a specific error. I'm interested in what happens when the function throws so I threw an error instead of the ...
Dany Jamous's user avatar

15 30 50 per page
1
2 3 4 5
61