DbException.php 1.07 KB
Newer Older
1
2
3
4
5
6
7
8
9
<?php
/**
 * Created by PhpStorm.
 * User: crose
 * Date: 1/1/16
 * Time: 12:43 PM
 */


10
namespace qfq;
11

12
require_once(__DIR__ . '/AbstractException.php');
13

14
15
16
17
18
19
20
/**
 * Class UserException
 *
 * Thrown by Form or FormElement on User errors
 *
 * @package qfq\exceptions
 */
21
class DbException extends AbstractException {
22
23
24
25
26

    /*
    * @return string HTML formatted error string
    */
    public function formatMessage() {
27
28

        $this->messageArray['Type'] = 'Db Exception';
29
30
31
32
        $this->messageArray['Form'] = Store::getVar(SYSTEM_FORM, STORE_SYSTEM);
        $this->messageArray['Form Element'] = Store::getVar(SYSTEM_FORM_ELEMENT, STORE_SYSTEM);
        $this->messageArray['Form Element Column'] = Store::getVar(SYSTEM_FORM_ELEMENT_COLUMN, STORE_SYSTEM);
        $this->messageArray['SQL before evaluation'] = Store::getVar(SYSTEM_SQL_RAW, STORE_SYSTEM);
33
        $this->messageArray['SQL final'] = Store::getVar(SYSTEM_SQL_FINAL, STORE_SYSTEM);
34
        $this->messageArray['SQL Params'] = Store::getVar(SYSTEM_SQL_PARAM_ARRAY, STORE_SYSTEM);
35
36
37

        return parent::formatException();

38
39
    }
}