Skip to content

Commit

Permalink
add new exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
cspray committed Aug 24, 2019
1 parent 5b98e8c commit 1efc080
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v1.1.0 - 2019-08-24

- Added CircularDependencyException
- Added DependencyInjectionException
- Added InvalidStateException

## v1.0.0 - 2017-05-13

- Added NotFoundException
Expand Down
15 changes: 15 additions & 0 deletions src/CircularDependencyException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types = 1);

/**
* An exception thrown if a circular dependency has been encountered that would result in an
* infinite loop or some other state that cannot be handled properly.
*
* @license See LICENSE file in project root
*/

namespace Cspray\Labrador\Exception;

class CircularDependencyException extends Exception {
}
12 changes: 12 additions & 0 deletions src/DependencyInjectionException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php declare(strict_types=1);

namespace Cspray\Labrador\Exception;

/**
*
* @package Cspray\Labrador\Exception
* @license See LICENSE in source root
*/
class DependencyInjectionException extends Exception {

}
12 changes: 12 additions & 0 deletions src/InvalidStateException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php declare(strict_types=1);

/**
* An exception thrown when a Labrador\Engine is asked to do something that it cannot do because of the state the Engine
* is in.
*
* @license See LICENSE in source root.
*/
namespace Cspray\Labrador\Exception;

class InvalidStateException extends Exception {
}

0 comments on commit 1efc080

Please sign in to comment.