Class: Dbviewer::ErrorHandler
- Inherits:
-
Object
- Object
- Dbviewer::ErrorHandler
- Defined in:
- lib/dbviewer/error_handler.rb
Overview
ErrorHandler provides centralized error handling for database operations
Class Method Summary collapse
-
.with_error_handling(operation_name, default_return = nil) { ... } ⇒ Object
Execute a block with error handling.
Class Method Details
.with_error_handling(operation_name, default_return = nil) { ... } ⇒ Object
Execute a block with error handling
10 11 12 13 14 15 |
# File 'lib/dbviewer/error_handler.rb', line 10 def with_error_handling(operation_name, default_return = nil) yield rescue => e Rails.logger.error("[DBViewer] Error #{operation_name}: #{e.}") default_return end |