11 Replies
Any idea how to prevent this code from crashing?
While true()
this is not code that will even compileSorry I meant while (true)
Well, then, that's probably why it crashes, an infinite loop with no exit condition
That’s the original code
Could be because you're throwing nothing if an exception occurs
Hard to tell why it crashes if there's no error message
they're not throwing nothing,
throw;
is a rethrowWindows10CE#8553
REPL Result: Failure
Exception: ArgumentException
Compile: 342.404ms | Execution: 27.679ms | React with ❌ to remove this embed.
it rethrows the exception with a preserved stacktrace
catch (Exception) { throw; }
is the exact same as having no try/catch at allHuh, TIL. Thought it's more like
catch (_) { throw new Exception() }
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.