[ticket/12802] Properly handle connection failures in SQLite3

Wrong exception was being caught and connection error was not being propagated.
https://tracker.phpbb.com/browse/PHPBB3-12802