Skip to content

Commit

Permalink
Merge pull request #43 from julien-jean/doofinder-exception
Browse files Browse the repository at this point in the history
Refactor all ManagementApi exceptions to extend a generic DoofinderException
  • Loading branch information
carlosescri authored Sep 23, 2019
2 parents 37f49ef + 4e61dcf commit f6dcf34
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions src/Management/Errors/DoofinderException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

namespace Doofinder\Api\Management\Errors;

class DoofinderException extends \Exception {}
2 changes: 1 addition & 1 deletion src/Management/Errors/IndexingInProgress.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

namespace Doofinder\Api\Management\Errors;

class IndexingInProgress extends \Exception {}
class IndexingInProgress extends DoofinderException {}
2 changes: 1 addition & 1 deletion src/Management/Errors/InvalidApiKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

namespace Doofinder\Api\Management\Errors;

class InvalidApiKey extends \Exception {}
class InvalidApiKey extends DoofinderException {}
2 changes: 1 addition & 1 deletion src/Management/Errors/NotAllowed.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

namespace Doofinder\Api\Management\Errors;

class NotAllowed extends \Exception {}
class NotAllowed extends DoofinderException {}
2 changes: 1 addition & 1 deletion src/Management/Errors/NotFound.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
namespace Doofinder\Api\Management\Errors;

class NotFound extends \Exception {}
class NotFound extends DoofinderException {}
2 changes: 1 addition & 1 deletion src/Management/Errors/NotProcessedResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

namespace Doofinder\Api\Management\Errors;

class NotProcessedResponse extends \Exception {}
class NotProcessedResponse extends DoofinderException {}
2 changes: 1 addition & 1 deletion src/Management/Errors/QuotaExhausted.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

namespace Doofinder\Api\Management\Errors;

class QuotaExhausted extends \Exception {}
class QuotaExhausted extends DoofinderException {}
2 changes: 1 addition & 1 deletion src/Management/Errors/ThrottledResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

namespace Doofinder\Api\Management\Errors;

class ThrottledResponse extends \Exception {}
class ThrottledResponse extends DoofinderException {}
2 changes: 1 addition & 1 deletion src/Management/Errors/TypeAlreadyExists.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

namespace Doofinder\Api\Management\Errors;

class TypeAlreadyExists extends \Exception {}
class TypeAlreadyExists extends DoofinderException {}
2 changes: 1 addition & 1 deletion src/Management/Errors/WrongResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

namespace Doofinder\Api\Management\Errors;

class WrongResponse extends \Exception {}
class WrongResponse extends DoofinderException {}

0 comments on commit f6dcf34

Please sign in to comment.