Promptles
Programming Basics

try / catch

intermediate

Definition

A way to let code attempt something that might fail and, if it does, handle the problem calmly instead of crashing.

In the wild

The app reads a settings file inside `try`. If the file is damaged, the `catch` part shows "This settings file is damaged" instead of a blank screen.

More from Programming Basics