This repository was archived by the owner on May 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathValidationException.php
More file actions
executable file
·85 lines (79 loc) · 2.62 KB
/
ValidationException.php
File metadata and controls
executable file
·85 lines (79 loc) · 2.62 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/**
* OWASP Enterprise Security API (ESAPI)
*
* This file is part of the Open Web Application Security Project (OWASP)
* Enterprise Security API (ESAPI) project.
*
* LICENSE: This source file is subject to the New BSD license. You should read
* and accept the LICENSE before you use, modify, and/or redistribute this
* software.
*
* PHP version 5.2
*
* @category OWASP
* @package ESAPI_Errors
* @author Andrew van der Stock <vanderaj@owasp.org>
* @author Mike Boberski <boberski_michael@bah.com>
* @copyright 2009-2010 The OWASP Foundation
* @license http://www.opensource.org/licenses/bsd-license.php New BSD license
* @version SVN: $Id$
* @link http://www.owasp.org/index.php/ESAPI
*/
require_once dirname(__FILE__).'/EnterpriseSecurityException.php';
/**
* A ValidationException should be thrown to indicate that the data provided by
* the user or from some other external source does not match the validation
* rules that have been specified for that data.
*
* @category OWASP
* @package ESAPI_Errors
* @author Andrew van der Stock <vanderaj@owasp.org>
* @author Mike Boberski <boberski_michael@bah.com>
* @copyright 2009-2010 The OWASP Foundation
* @license http://www.opensource.org/licenses/bsd-license.php New BSD license
* @version Release: @package_version@
* @link http://www.owasp.org/index.php/ESAPI
*/
class ValidationException extends EnterpriseSecurityException
{
/** The UI reference that caused this ValidationException */
private $_context;
/**
* Instantiates a new ValidationException.
* Create a new ValidationAvailabilityException
*
* @param string $userMessage the message displayed to the user
* @param string $logMessage the message logged
* @param string $context the source that caused this exception
*
* @return does not return a value.
*/
function __construct($userMessage = '', $logMessage = '', $context = '')
{
parent::__construct($userMessage, $logMessage);
$this->setContext($context);
}
/**
* Returns the UI reference that caused this ValidationException
*
* @return string context, the source that caused the exception, stored as a
* string
*/
public function getContext()
{
return $this->_context;
}
/**
* Set's the UI reference that caused this ValidationException
*
* @param string $context the context to set, passed as a String
*
* @return does not return a value.
*/
public function setContext($context)
{
$this->_context = $context;
}
}
?>