Examples demonstrating reliability features: exception handling and connection retry.
Exception handling: typed exceptions and error diagnostics.
Topics covered:
- Typed exceptions - Specific exception types for different errors
- Exception hierarchy - DatabaseException and subclasses
- Error diagnostics - Query context, sanitized parameters, debug information
- Error handling patterns - Best practices for error handling
Connection retry: automatic retry with exponential backoff.
Topics covered:
- Automatic retry - Retry failed connections automatically
- Exponential backoff - Increasing delay between retries
- Retry configuration - Configure retry attempts and delays
- Error handling - Handle retry failures gracefully
# Run examples
php 01-exception-handling.php
php 02-connection-retry.php- Typed Exceptions - Specific exception types for precise error handling
- Error Diagnostics - Query context and debug information in exceptions
- Connection Retry - Automatic retry with exponential backoff
- Error Recovery - Graceful handling of transient errors
- Transactions - Transaction management
- Architecture - High availability patterns