Exception: PgSqlTriggers::ExecutionError
- Defined in:
- lib/pg_sql_triggers/errors.rb
Overview
Error raised when SQL execution fails
Instance Attribute Summary
Attributes inherited from Error
#context, #error_code, #recovery_suggestion
Instance Method Summary collapse
Methods inherited from Error
#initialize, #to_h, #user_message
Constructor Details
This class inherits a constructor from PgSqlTriggers::Error
Instance Method Details
#default_error_code ⇒ Object
175 176 177 |
# File 'lib/pg_sql_triggers/errors.rb', line 175 def default_error_code "EXECUTION_FAILED" end |
#default_message ⇒ Object
179 180 181 |
# File 'lib/pg_sql_triggers/errors.rb', line 179 def "SQL execution failed" end |
#default_recovery_suggestion ⇒ Object
183 184 185 186 187 188 189 |
# File 'lib/pg_sql_triggers/errors.rb', line 183 def default_recovery_suggestion if context[:database_error] "Review the SQL syntax and database error. Ensure all table and column names are correct." else "Review the SQL and ensure it is valid PostgreSQL syntax." end end |