PowerShell - Why “Divide By Zero Exception” is not being Caught?

后端 未结 3 1118
傲寒
傲寒 2020-12-19 05:46

On my Machine each one of the following code snippets throws and exception instead of printing to the standard output \"1\" and \"2\" Why the exception is not being Caught?<

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-19 05:54

    RuntimeException in v2 are not catchable. It has been fixed in v3.

    Dividing by zero falls into this category.

提交回复
热议问题