mirror of
https://github.com/wiosna-dev/limesurvey-api-client.git
synced 2026-03-12 18:11:50 +01:00
composer.json - move tests-related classes to "autoload-dev" section (used for development purposes only and avoid polluting the autoloader in production)
This commit is contained in:
36
src/Exception/CreateSessionKeyFailedException.php
Normal file
36
src/Exception/CreateSessionKeyFailedException.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* (c) Meritoo.pl, http://www.meritoo.pl
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Meritoo\LimeSurvey\ApiClient\Exception;
|
||||
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* An exception used while create of the session key has failed
|
||||
*
|
||||
* @author Krzysztof Niziol <krzysztof.niziol@meritoo.pl>
|
||||
* @copyright Meritoo.pl
|
||||
*/
|
||||
class CreateSessionKeyFailedException extends Exception
|
||||
{
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
* @param string $reason (optional) Reason of failure, e.g. "Invalid user name or password"
|
||||
*/
|
||||
public function __construct($reason = '')
|
||||
{
|
||||
$message = 'Create of the session key has failed';
|
||||
|
||||
if (!empty($reason)) {
|
||||
$message = sprintf('%s. Reason: \'%s\'.', $message, $reason);
|
||||
}
|
||||
|
||||
parent::__construct($message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user