lib: use internal/options to query --abort-on-uncaught-exception
#25862
+17
−6
internal/options to query --abort-on-uncaught-exception
#25862