Skip to content

[CMS PR 36492] Fix wrong exception type and add back alert#155

Merged
brianteeman merged 2 commits intobrianteeman:sql_update_fail_logfrom
richard67:4.0-dev-brianteeman-sql-update-fail-log-mod-1
Jan 8, 2022
Merged

[CMS PR 36492] Fix wrong exception type and add back alert#155
brianteeman merged 2 commits intobrianteeman:sql_update_fail_logfrom
richard67:4.0-dev-brianteeman-sql-update-fail-log-mod-1

Conversation

@richard67
Copy link
Copy Markdown

@richard67 richard67 commented Jan 8, 2022

Pull Request for joomla#36492 .

Summary of Changes

  • Fix exception type in the catch to get the new logging when an SQL error happens in a new update SQL script.
  • Add back the logging to jerror to get back the alert shown in backend.

Testing Instructions

Add a new update SQL script with a version newer than the database schema version and which contains an SQL statement which causes an SQL error, e.g. an UPDATE statement for a not existing table, to the update package for PR joomla#36492 and update a 4.0.x to that package.

Actual result BEFORE applying this Pull Request

In backend no warning alert but an unhandled exception:

j4 0-test-pr-36492-with-sql-error_before

The log file does not contain the new logs added by PR joomla#36492 .

When I fix the wrong exception type in the update package but don't add back the warning alert, I get:

j4 0-test-pr-36492-with-sql-error_before_with-exception-fix

Expected result AFTER applying this Pull Request

In backend warning alert instead of unhandled exception:

j4 0-test-pr-36492-with-sql-error_after_with-exception-fix

The log file contains the new logs added by PR joomla#36492 .

The misleading green success message will be handled by Nicholas' PR for 4.1-dev.

Documentation Changes Required

None.

@brianteeman brianteeman merged commit dcf24bd into brianteeman:sql_update_fail_log Jan 8, 2022
@richard67 richard67 deleted the 4.0-dev-brianteeman-sql-update-fail-log-mod-1 branch January 8, 2022 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants