BILINGUAL WORD CARD · RANK 76

try / catch

🛡️ Airbag that catches runtime errors safely

Exception handling block to catch runtime errors.

中文对照 · Chinese

🛡️ 程序的汽车安全气囊

`try` 先尝试运行可能出错的代码,万一出错由 `catch`(Python 为 `except`)接住,防止程序闪退。

Code example

try { /* code */ } catch (...) {}
Explore 100 bilingual word cards →