Вход Регистрация
Файл: sys/library/goDB/Exceptions/Runtime.php
Строк: 45
<?php
/**
 * @package goDB
 */

namespace goDBExceptions;

/**
 * The basic runtime-exception of the library
 *
 * @author Oleg Grigoriev <go.vasac@gmail.com>
 */
abstract class Runtime extends RuntimeException implements Exception
{
    public function 
__construct($message$code null$previous null)
    {
        
$backtrace = new HelpersBacktrace($this->getTrace(), 'goDB\');
        $this->realFile = $this->file;
        $this->realLine = $this->line;
        $this->userTrace = $backtrace->getTrace();
        $this->file = $backtrace->getFile();
        $this->line = $backtrace->getLine();
        parent::__construct($message, $code, $previous);
    }

    /**
     * @return array
     */
    final public function getUserTrace()
    {
        return $this->userTrace;
    }

    /**
     * @return string
     */
    final public function getRealFile()
    {
        return $this->realFile;
    }

    /**
     * @return int
     */
    final public function getRealLine()
    {
        return $this->realLine;
    }

    /**
     * @var array
     */
    private $userTrace;

    /**
     * @var string
     */
    private $realFile;

    /**
     * @var int
     */
    private $realLine;
}
Онлайн: 2
Реклама