Troubleshooting error display
parent
686d2c1153
commit
d32e270598
|
@ -29,7 +29,7 @@ function connectDB($config, $database = '', $dbFile = '', $platformId = '') {
|
||||||
'dbFile' => $config['db']['sqlite_file'],
|
'dbFile' => $config['db']['sqlite_file'],
|
||||||
]);
|
]);
|
||||||
$pdo = $db->getConnection();
|
$pdo = $db->getConnection();
|
||||||
return $db;
|
return ['db' => $db, 'error' => null];
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$error = getError('Error connecting to DB.', $e->getMessage());
|
$error = getError('Error connecting to DB.', $e->getMessage());
|
||||||
return $error;
|
return $error;
|
||||||
|
@ -48,7 +48,7 @@ function connectDB($config, $database = '', $dbFile = '', $platformId = '') {
|
||||||
'password' => $config['db']['sql_password'],
|
'password' => $config['db']['sql_password'],
|
||||||
]);
|
]);
|
||||||
$pdo = $db->getConnection();
|
$pdo = $db->getConnection();
|
||||||
return $db;
|
return ['db' => $db, 'error' => null];
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$error = getError('Error connecting to DB.', $e->getMessage());
|
$error = getError('Error connecting to DB.', $e->getMessage());
|
||||||
return $error;
|
return $error;
|
||||||
|
|
Loading…
Reference in New Issue