questlab/app/exceptions/FileCopyException.inc

79 lines
1.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* Questlab
*
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
* @copyright 2014 2016 Heinrich-Heine-Universität Düsseldorf
* @license http://www.gnu.org/licenses/gpl.html
* @link https://github.com/coderkun/questlab
*/
namespace hhu\z\exceptions;
/**
* Exception: File copy went wrong
*
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
*/
class FileCopyException extends \nre\core\Exception
{
/**
* Error code
*
* @var int
*/
const CODE = 204;
/**
* Error message
*
* @var string
*/
const MESSAGE = 'File copy went wrong';
/**
* Nested error
*
* @var array
*/
private $nestedError;
/**
* Construct a new exception.
*
* @param array $nestedError Nested error
* @param string $message Error message
* @param int $code Error code
*/
function __construct($nestedError, $message=self::MESSAGE, $code=self::CODE)
{
parent::__construct(
$message,
$code,
$nestedError['message']
);
// Store values
$this->nestedError = $nestedError;
}
/**
* Get nested error.
*
* @return Nested error
*/
public function getNestedError()
{
return $this->nestedError;
}
}
?>