Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Tomáš Trávníček
doctrine-dbal
Commits
5b2c3a4e
Commit
5b2c3a4e
authored
May 12, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
899024b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
1 deletion
+58
-1
Exception.php
lib/Doctrine/Exception.php
+58
-1
No files found.
lib/Doctrine/Exception.php
View file @
5b2c3a4e
...
@@ -30,4 +30,61 @@
...
@@ -30,4 +30,61 @@
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
*/
class
Doctrine_Exception
extends
Exception
class
Doctrine_Exception
extends
Exception
{
}
{
/**
* @var array $_errorMessages an array of error messages
*/
protected
static
$_errorMessages
=
array
(
Doctrine
::
ERR
=>
'unknown error'
,
Doctrine
::
ERR_ALREADY_EXISTS
=>
'already exists'
,
Doctrine
::
ERR_CANNOT_CREATE
=>
'can not create'
,
Doctrine
::
ERR_CANNOT_ALTER
=>
'can not alter'
,
Doctrine
::
ERR_CANNOT_REPLACE
=>
'can not replace'
,
Doctrine
::
ERR_CANNOT_DELETE
=>
'can not delete'
,
Doctrine
::
ERR_CANNOT_DROP
=>
'can not drop'
,
Doctrine
::
ERR_CONSTRAINT
=>
'constraint violation'
,
Doctrine
::
ERR_CONSTRAINT_NOT_NULL
=>
'null value violates not-null constraint'
,
Doctrine
::
ERR_DIVZERO
=>
'division by zero'
,
Doctrine
::
ERR_INVALID
=>
'invalid'
,
Doctrine
::
ERR_INVALID_DATE
=>
'invalid date or time'
,
Doctrine
::
ERR_INVALID_NUMBER
=>
'invalid number'
,
Doctrine
::
ERR_MISMATCH
=>
'mismatch'
,
Doctrine
::
ERR_NODBSELECTED
=>
'no database selected'
,
Doctrine
::
ERR_NOSUCHFIELD
=>
'no such field'
,
Doctrine
::
ERR_NOSUCHTABLE
=>
'no such table'
,
Doctrine
::
ERR_NOT_CAPABLE
=>
'Doctrine backend not capable'
,
Doctrine
::
ERR_NOT_FOUND
=>
'not found'
,
Doctrine
::
ERR_NOT_LOCKED
=>
'not locked'
,
Doctrine
::
ERR_SYNTAX
=>
'syntax error'
,
Doctrine
::
ERR_UNSUPPORTED
=>
'not supported'
,
Doctrine
::
ERR_VALUE_COUNT_ON_ROW
=>
'value count on row'
,
Doctrine
::
ERR_INVALID_DSN
=>
'invalid DSN'
,
Doctrine
::
ERR_CONNECT_FAILED
=>
'connect failed'
,
Doctrine
::
ERR_NEED_MORE_DATA
=>
'insufficient data supplied'
,
Doctrine
::
ERR_EXTENSION_NOT_FOUND
=>
'extension not found'
,
Doctrine
::
ERR_NOSUCHDB
=>
'no such database'
,
Doctrine
::
ERR_ACCESS_VIOLATION
=>
'insufficient permissions'
,
Doctrine
::
ERR_LOADMODULE
=>
'error while including on demand module'
,
Doctrine
::
ERR_TRUNCATED
=>
'truncated'
,
Doctrine
::
ERR_DEADLOCK
=>
'deadlock detected'
,
);
/**
* Return a textual error message for a Doctrine error code
*
* @param int|array integer error code,
* null to get the current error code-message map,
* or an array with a new error code-message map
*
* @return string error message
*/
public
function
errorMessage
(
$value
=
null
)
{
if
(
is_null
(
$value
))
{
return
self
::
$_errorMessages
;
}
return
isset
(
self
::
$_errorMessages
[
$value
])
?
self
::
$_errorMessages
[
$value
]
:
self
::
$_errorMessages
[
Doctrine
::
ERR
];
}
}
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