Skip to main content
Best practices
0 votes
3 replies
99 views

During a pre-interview call with a company, I got asked a couple questions about swift concurrency. One of the questions was: When using for try await to iterate through an async sequence, how do you ...
CompC's user avatar
  • 435
1 vote
2 answers
129 views

I've been creating a basic version of a LinkedList class mainly for the sake of an assignment (though also to gain a better understanding of it all). I've gotten to the stage where I'm writing error ...
Neptunium-Eater's user avatar
Best practices
1 vote
4 replies
71 views

At my new job they use a try-except construction in the entry-point of the main python script. if __name__ == "__main__": try: main() except Exception: ...
SimonGötz's user avatar
2 votes
1 answer
118 views

I am running many Bayesian models in parallel and want to skip models that take longer than a certain amount of time (e.g., 10 seconds). To do this, I wrapped rstanarm::stan_glm() inside R.utils::...
MochaModeler's user avatar
3 votes
2 answers
208 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
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
2 votes
1 answer
84 views

ArgumentError (Invalid argument(s) (onError): The error handler of Future.catchError must return a value of the future's type) I get the above error when I log in with credentials that don't exist in ...
thabo motshweni's user avatar
-2 votes
1 answer
116 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
Advice
0 votes
4 replies
124 views

I have a question about how try/finally behaves when using return statements in C#. Consider the following methods: public int Test() { return 12; } public int Test2() { try { ...
Colin's user avatar
  • 41
-8 votes
1 answer
160 views

I have this method in my program, it is meant to register the gender of the user for later on in the program (with Male and Female as the only valid options): public static void Main(string[] args) { ...
Matto's user avatar
  • 1
0 votes
2 answers
101 views

My question is similar to this one but that returns the error, and this one which has no answers. I want to catch errors (returning NA) and warnings (returning NaN) but saving the warning message for ...
Earlien's user avatar
  • 319
-1 votes
1 answer
177 views

I was wondering how was the correct usage of the try execpt/execpt(err) function in python and why it's raising up this error UnboundLocalError: cannot access local variable 'player_move' where it ...
aPythonDude's user avatar
2 votes
1 answer
106 views

C# .Net Framework 4.8. I am using CryptoStream Reader to decrypt an encrypted datastream within a Using {} block. If the Key used for decryption is incorrect, the CryptoStream Reader throws an ...
Himilou's user avatar
  • 175
-1 votes
1 answer
70 views

I have a controller method which I am using to change the status of the row data in the database. But I forget to mention status field in the model file. So the status was not changing in the database....
nischalinn's user avatar
  • 1,282
-2 votes
1 answer
205 views

I'm working on a Java utility. This utility should read some input files (one or several). Each input file contains three types of strings, representing an integer, a float, and a string. The utility ...
longpastgone's user avatar

15 30 50 per page
1
2 3 4 5
588