Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
b1d94e5c
Commit
b1d94e5c
authored
May 07, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unnecessary instance check, fixed Sphinx schema
parent
ca465eae
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
Schema.php
extensions/sphinx/Schema.php
+6
-0
Command.php
framework/db/Command.php
+0
-2
No files found.
extensions/sphinx/Schema.php
View file @
b1d94e5c
...
@@ -60,6 +60,12 @@ class Schema extends Object
...
@@ -60,6 +60,12 @@ class Schema extends Object
private
$_builder
;
private
$_builder
;
/**
/**
* @var array map of DB errors and corresponding exceptions
* If left part is found in DB error message exception class from the right part is used.
*/
public
$exceptionMap
=
[];
/**
* @var array mapping from physical column types (keys) to abstract column types (values)
* @var array mapping from physical column types (keys) to abstract column types (values)
*/
*/
public
$typeMap
=
[
public
$typeMap
=
[
...
...
framework/db/Command.php
View file @
b1d94e5c
...
@@ -782,14 +782,12 @@ class Command extends \yii\base\Component
...
@@ -782,14 +782,12 @@ class Command extends \yii\base\Component
}
else
{
}
else
{
$exceptionClass
=
'\yii\db\Exception'
;
$exceptionClass
=
'\yii\db\Exception'
;
$schema
=
$this
->
db
->
getSchema
();
$schema
=
$this
->
db
->
getSchema
();
if
(
$schema
instanceof
Schema
)
{
$exceptionMap
=
$schema
->
exceptionMap
;
$exceptionMap
=
$schema
->
exceptionMap
;
foreach
(
$exceptionMap
as
$error
=>
$class
)
{
foreach
(
$exceptionMap
as
$error
=>
$class
)
{
if
(
strpos
(
$e
->
getMessage
(),
$error
)
!==
false
)
{
if
(
strpos
(
$e
->
getMessage
(),
$error
)
!==
false
)
{
$exceptionClass
=
$class
;
$exceptionClass
=
$class
;
}
}
}
}
}
$message
=
$e
->
getMessage
()
.
"
\n
The SQL being executed was:
$rawSql
"
;
$message
=
$e
->
getMessage
()
.
"
\n
The SQL being executed was:
$rawSql
"
;
$errorInfo
=
$e
instanceof
\PDOException
?
$e
->
errorInfo
:
null
;
$errorInfo
=
$e
instanceof
\PDOException
?
$e
->
errorInfo
:
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment