Added vendor/ directory for Composer's installed files

This commit is contained in:
Ascendings
2015-08-30 12:33:20 -04:00
parent 45df179c49
commit b66a773ed8
1162 changed files with 112457 additions and 0 deletions

78
vendor/illuminate/database/QueryException.php vendored Executable file
View File

@ -0,0 +1,78 @@
<?php namespace Illuminate\Database;
use PDOException;
class QueryException extends PDOException {
/**
* The SQL for the query.
*
* @var string
*/
protected $sql;
/**
* The bindings for the query.
*
* @var array
*/
protected $bindings;
/**
* Create a new query exception instance.
*
* @param string $sql
* @param array $bindings
* @param \Exception $previous
* @return void
*/
public function __construct($sql, array $bindings, $previous)
{
parent::__construct('', 0, $previous);
$this->sql = $sql;
$this->bindings = $bindings;
$this->previous = $previous;
$this->code = $previous->getCode();
$this->message = $this->formatMessage($sql, $bindings, $previous);
if ($previous instanceof PDOException)
{
$this->errorInfo = $previous->errorInfo;
}
}
/**
* Format the SQL error message.
*
* @param string $sql
* @param array $bindings
* @param \Exception $previous
* @return string
*/
protected function formatMessage($sql, $bindings, $previous)
{
return $previous->getMessage().' (SQL: '.str_replace_array('\?', $bindings, $sql).')';
}
/**
* Get the SQL for the query.
*
* @return string
*/
public function getSql()
{
return $this->sql;
}
/**
* Get the bindings for the query.
*
* @return array
*/
public function getBindings()
{
return $this->bindings;
}
}