array index out of bound may not throw exception?

Adam D Ruppe destructionator at gmail.com
Fri Jul 21 23:32:41 UTC 2023


On Friday, 21 July 2023 at 21:27:45 UTC, mw wrote:
> However, I just debugged a case, where out of bound array index 
> didn't throw exception, and just hang the thread

Uncaught exceptions in a thread terminate that thread and are 
reported when you call the `join` method of the thread.

I think you can still get a debugger to break on them but im not 
entirely sure, it is a different switch than in the main thread i 
think.

But you might want to do your own try/catch block around a thread 
to report it differently if you have a better way for your 
application.


More information about the Digitalmars-d-learn mailing list