-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAuthException.php
66 lines (59 loc) · 1.3 KB
/
AuthException.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* Custom database-generated exception.
*/
class Mapper_AuthException extends Mapper_Exception
{
/**
* Array with exceptions, field => exception.
*
* @var array
*/
private $_exceptions = array();
/**
* Original exception
*
* @var Exception
*/
private $_origException = null;
/**
* Generator procedure name.
*
* @var string
*/
private $_procedureName = null;
/**
* Constructor.
*
* @param Exception $origException If present, means a single
* exception caused this one
* (usually DataException).
* @param string $_procedureName Invoker (if present).
*/
public function __construct($origException = null, $procedureName = null)
{
parent::__construct(($procedureName? $procedureName . ": " : ""));
$this->_procedureName = $procedureName;
$this->_origException = $origException;
}
/**
* Return parent exceptions associated to field (if present).
* Exceptions may be associated not always.
*
* @return array
*/
public function getExceptions()
{
return $this->_exceptions;
}
/**
* Return generator procedure or null of no procedure
* is assigned to this exception.
*
* @return string
*/
public function getProcedureName()
{
return $this->_procedureName;
}
}