Selenium Framework - Part 36 - Enigma - How to handle exception in static block

Описание к видео Selenium Framework - Part 36 - Enigma - How to handle exception in static block

Hi All,

In this video, I have explained how handling exception in static block differs from conventional methods.

1. Why we have to mandatorily use try catch block inside static blocks?
2. Can I throw a runtime exception inside try catch block?
3. How can I stop the execution where there is a exception in try catch inside static block?
4. System.exit() method usage
5. Can we consider about removing the static block itself?

Комментарии

Информация по комментариям в разработке