The behaviour expected of filter exceptions is: -> throw in a async task with a try catch in the caller -> don't stop -> throw in a new thread with a try catch in the caller -> stop -> throw in the main thread without any try catch -> stop (#18333)
Including a new test to test the fix of #17601.
Fixing #16588, create a while 1 to stops the program execution when an exception is thrown and no try catch is found and MONO_DEBUG=suspend-on-unhandled.
Fixes #17601
Fixes #16588
Co-authored-by: Thays Grazia <thaystg@gmail.com>