liveBook · Manning

Catch clause

A catch clause is an exception-handling construct that executes a handler when an associated operation raises a matching exception or error.

How 2 Manning books explain it

100 SQL Server Mistakes and How to Avoid Them

TRY..CATCH is T-SQL control-flow syntax that executes protected code in a TRY block and transfers control to a CATCH block when a catchable error occurs.

How it is used
Traps stored-procedure errors so transactions can be recovered and failures can be reported or logged meaningfully.
How deep it goes
Explains control transfer from TRY to CATCH and applies it to transaction rollback, custom errors, and logging.
Examples
Uses InsertSalesOrder failures, including missing tables, foreign-key violations, and duplicate sales-order keys.
What you can do after
Apply it via T-SQL to trap failures, roll back transactions, log details, and raise clearer errors.

Read how 100 SQL Server Mistakes and How to Avoid Them explains catch clause →

Elixir in Action, Third Edition

A catch clause is a clause of a try expression that pattern-matches and handles an error, exit, or throw.

How it is used
Handles runtime errors, exits, and throws within try expressions.
How deep it goes
Explains syntax, event types, pattern matching, return values, and cleanup, but stops short of broader fault-tolerance architecture.
Examples
Uses a helper lambda, raised errors, thrown values, exits, tuple-pattern catches, and cleanup output.
What you can do after
Apply it via Elixir try expressions to classify, selectively handle, and return values from runtime events.

Read how Elixir in Action, Third Edition explains catch clause →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.