Questtype ?Textinput?: add support for field sizes (Issue #252) and general improvements
This commit is contained in:
commit
8d903135a5
3476 changed files with 599099 additions and 0 deletions
77
exceptions/ClassNotValidException.inc
Normal file
77
exceptions/ClassNotValidException.inc
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* NRE
|
||||
*
|
||||
* @author coderkun <olli@coderkun.de>
|
||||
* @copyright 2013 coderkun (http://www.coderkun.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.coderkun.de/projects/nre
|
||||
*/
|
||||
|
||||
namespace nre\exceptions;
|
||||
|
||||
|
||||
/**
|
||||
* Exception: Class not valid.
|
||||
*
|
||||
* @author coderkun <olli@coderkun.de>
|
||||
*/
|
||||
class ClassNotValidException extends \nre\core\Exception
|
||||
{
|
||||
/**
|
||||
* Error code
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const CODE = 74;
|
||||
/**
|
||||
* Error message
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const MESSAGE = 'class not valid';
|
||||
|
||||
/**
|
||||
* Name of the invalid class
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $className;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Construct a new exception.
|
||||
*
|
||||
* @param string $className Name of the invalid class
|
||||
*/
|
||||
function __construct($className, $message=self::MESSAGE, $code=self::CODE)
|
||||
{
|
||||
parent::__construct(
|
||||
$message,
|
||||
$code,
|
||||
$className
|
||||
);
|
||||
|
||||
// Store value
|
||||
$this->className = $className;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the name of the invalid class.
|
||||
*
|
||||
* @return string Name of the invalid class
|
||||
*/
|
||||
public function getClassName()
|
||||
{
|
||||
return $this->className;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue