Use "try-catch" block instead of "if" block to prevent interruption of new installation
authorRazeSoldier <razesoldier@outlook.com>
Mon, 11 Feb 2019 11:49:38 +0000 (19:49 +0800)
committerRazeSoldier <razesoldier@outlook.com>
Tue, 12 Feb 2019 05:38:32 +0000 (13:38 +0800)
commit56d2fc8081502ebcc793e17cc9c7083c8b9d2126
tree6190a72516640f452aae170538bccf28da2ec496
parent7099937b42cdf52948ae0c3c5f761ca573f7e530
Use "try-catch" block instead of "if" block to prevent interruption of new installation

New installation blocked when checking if the DB exists,
because when select DB, if it fails, it will throw an exception.

So I modify the checking logic to determine if there is an exception
thrown instead of detecting the return value.

Bug: T215566
Change-Id: I6817997434df7adc79fbc1b224b77c0daa8cc11d
RELEASE-NOTES-1.33
includes/installer/DatabaseInstaller.php