Changeset 719 for trunk/lib/PDO.inc.php


Ignore:
Timestamp:
Mar 9, 2020 3:13:45 AM (4 years ago)
Author:
anonymous
Message:

Update Prefs to use PDO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/PDO.inc.php

    r718 r719  
    242242
    243243        if (!$this->_connected) {
    244             $app->logMsg(sprintf('No DB connection to run %s', __METHOD__), LOG_NOTICE, __FILE__, __LINE__);
    245             return false;
    246         }
     244            throw new \Exception(sprintf('No DB connection to run %s', __METHOD__));
     245        }
     246
    247247        $this->_connected = false;
    248248        $this->dbh = null;
     249
    249250        return true;
    250251    }
     
    280281
    281282        if (!$this->_connected) {
    282             $app->logMsg(sprintf('No DB connection to run %s', __METHOD__), LOG_NOTICE, __FILE__, __LINE__);
    283             return false;
     283            throw new \Exception(sprintf('No DB connection to run %s', __METHOD__));
    284284        }
    285285
     
    374374
    375375        if (!$this->_connected) {
    376             $app->logMsg(sprintf('No DB connection to run %s', __METHOD__), LOG_NOTICE, __FILE__, __LINE__);
    377             return false;
     376            throw new \Exception(sprintf('No DB connection to run %s', __METHOD__));
    378377        }
    379378
     
    431430
    432431        if (!$this->_connected) {
    433             $app->logMsg(sprintf('No DB connection to run %s', __METHOD__), LOG_NOTICE, __FILE__, __LINE__);
    434             return false;
     432            throw new \Exception(sprintf('No DB connection to run %s', __METHOD__));
    435433        }
    436434
     
    527525
    528526        if (!$this->_connected) {
    529             $app->logMsg(sprintf('No DB connection to run %s', __METHOD__), LOG_NOTICE, __FILE__, __LINE__);
    530             return false;
     527            throw new \Exception(sprintf('No DB connection to run %s', __METHOD__));
    531528        }
    532529
     
    558555
    559556        if (!$this->_connected) {
    560             $app->logMsg(sprintf('No DB connection to run %s', __METHOD__), LOG_NOTICE, __FILE__, __LINE__);
    561             return false;
     557            throw new \Exception(sprintf('No DB connection to run %s', __METHOD__));
    562558        }
    563559
Note: See TracChangeset for help on using the changeset viewer.