Exceptions in multithreaded application.

前端 未结 10 1542
春和景丽
春和景丽 2021-02-15 00:02

I have heard from a very discerning person that an exception being thrown (and not caught) in a thread is being propagated to the parent thread. Is that true? I have tried some

10条回答
  •  梦谈多话
    2021-02-15 00:16

    Exception propagate upwards in the call-stack.

    If you start a new thread from a certain method, it will propagate upwards until it gets to that method.

    If that method doesn't catch it, you'll get a runtime error that there's an uncaught exception.

提交回复
热议问题