Skip to content

Commit

Permalink
refactored exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Apr 12, 2017
1 parent e89b1ab commit 8ec1461
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
20 changes: 20 additions & 0 deletions src/exceptions/Exception.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**
* Composer plugin for config assembling.
*
* @link https://github.com/hiqdev/composer-config-plugin
* @package composer-config-plugin
* @license BSD-3-Clause
* @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\composer\config\exceptions;

/**
* Common ancestor for all exception thrown by this library.
*
* @author Andrii Vasyliev <sol@hiqdev.com>
*/
class Exception extends \Exception
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\composer\config;
namespace hiqdev\composer\config\exceptions;

/**
* Failed read file exception.
*
* @author Andrii Vasyliev <sol@hiqdev.com>
*/
class FailedReadException extends \Exception
class FailedReadException extends Exception
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\composer\config;
namespace hiqdev\composer\config\exceptions;

/**
* Failed write file exception.
*
* @author Andrii Vasyliev <sol@hiqdev.com>
*/
class FailedWriteException extends \Exception
class FailedWriteException extends Exception
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\composer\config;
namespace hiqdev\composer\config\exceptions;

/**
* Unsupported file type exception.
*
* @author Andrii Vasyliev <sol@hiqdev.com>
*/
class UnsupportedFileTypeException extends \Exception
class UnsupportedFileTypeException extends FailedReadException
{
}

0 comments on commit 8ec1461

Please sign in to comment.