)]}'
{"oslo_db/sqlalchemy/migration.py":[{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"137079d77414986337f2ac9f7a2f889c1a488069","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            migration \u003d versioning_api.upgrade(engine, repository, version)"},{"line_number":80,"context_line":"        except Exception as ex:"},{"line_number":81,"context_line":"            raise exception.DBMigrationError(ex)"},{"line_number":82,"context_line":"    else:"},{"line_number":83,"context_line":"        migration \u003d versioning_api.downgrade(engine, repository,"},{"line_number":84,"context_line":"                                             version)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_391e01bb","line":81,"range":{"start_line":81,"start_character":1,"end_line":81,"end_character":48},"updated":"2017-09-08 05:35:20.000000000","message":"this is safe to raise subclass instance DBMigrationError, consuming projects will still catch the exception \n\nhttp://codesearch.openstack.org/?q\u003dDbMigrationError\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d","commit_id":"9a5a3b3395d1dfb754652fbe8deaba6c25e0ea28"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"4812b422d4590b87dab1d2060261f389d0678dcd","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            migration \u003d versioning_api.upgrade(engine, repository, version)"},{"line_number":80,"context_line":"        except Exception as ex:"},{"line_number":81,"context_line":"            raise exception.DBMigrationError(ex)"},{"line_number":82,"context_line":"    else:"},{"line_number":83,"context_line":"        migration \u003d versioning_api.downgrade(engine, repository,"},{"line_number":84,"context_line":"                                             version)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_702373a8","line":81,"range":{"start_line":81,"start_character":1,"end_line":81,"end_character":48},"in_reply_to":"7f287b81_391e01bb","updated":"2017-09-08 13:23:29.000000000","message":"Yeah, I think this is the way to do it.\n\nConsuming projects that have not been updated yet will have exception handing for DbMigrationError. Since DBMigrationError inherits from DbMigrationError, either one of them will be caught by that exception handling and things will work as expected.\n\nThe issue now for consuming projects is if they update to handle DBConnectionError, there is still code in oslo.db that raises DbConnectionError, which will not be caught by the new handling since it will not get parents of the expected exception.","commit_id":"9a5a3b3395d1dfb754652fbe8deaba6c25e0ea28"}]}
