try-catch
Error handling block
Try-catch is a programming construct for handling errors.
Code that might fail goes in the try block; if an error occurs, execution jumps to the catch block instead of crashing the program.
The try-catch prevented the app from dying when the server was unreachable.
Most modern programming languages use this pattern, though syntax varies.
Deviation from standard
handler · clause · statement · syntax · runtime · propagation · unwinding · nesting
Alternative if primary fails
- loggingRecording system events
- debuggingError removal from programs
- validationConfirming truth or accuracy
- defensiveProtective or easily threatened
robustness · resilience · fail-safe · recovery · retry · rollback · cleanup · dispose
exception
Deviation from standard
finally · handler · clause · statement · syntax · runtime · propagation · unwinding · nesting · scope
fallback
Alternative if primary fails
- loggingRecording system events
- debuggingError removal from programs
- validationConfirming truth or accuracy
defensive · robustness · resilience · fail-safe · recovery · retry · rollback · cleanup · dispose · timeout
Java
Programming language from Sun
- JavaScriptWeb programming language
- PythonLarge nonvenomous squeezer
- C++Object-oriented systems language
C# · PHP · Ruby · Swift · Kotlin · TypeScript · except · defer · promise · callback
- debuggingdebug, debugging, debugger, breakpoint, breakpoints