-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancementA general enhancement
Milestone
Description
Sam Brannen opened SPR-11564 and commented
Status Quo
The org.springframework.jdbc.datasource.init
package contains several exceptions related to reading, parsing, and executing SQL scripts; however, each of these exceptions extends RuntimeException
. Thus there is no clean way to catch and handle all types of script-related exceptions.
As a side effect of refactoring, #14165 already unified the exception hierarchy within org.springframework.jdbc.datasource.init
package by introducing a common ScriptException
base class that extends RuntimeException
, but this doesn't go far enough. ScriptException
should actually extend DataAccessException
to allow callers to handle all data access related exceptions in a single catch
block.
Deliverables
- Refactor
ScriptException
so that it extendsDataAccessException
. - Favor unchecked
ScriptExceptions
over checkedSQLExceptions
whenever feasible.
Affects: 4.0.2
Issue Links:
- Support multi-line SQL comments in ResourceDatabasePopulator and JdbcTestUtils [SPR-9531] #14165 Support multi-line SQL comments in ResourceDatabasePopulator and JdbcTestUtils
Metadata
Metadata
Assignees
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancementA general enhancement