-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add awareness of services a site should talk too
- Loading branch information
1 parent
2728f72
commit f52a801
Showing
12 changed files
with
184 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* @copyright 2009-2023 Vanilla Forums Inc. | ||
* @license Proprietary | ||
*/ | ||
|
||
namespace Garden\Sites\Exceptions; | ||
|
||
use Garden\Sites\Cluster; | ||
use Garden\Utils\ContextException; | ||
|
||
/** | ||
* Exception thrown when we detect an invalid region. | ||
*/ | ||
class InvalidRegionException extends ContextException | ||
{ | ||
/** | ||
* @param string $invalidRegion | ||
*/ | ||
public function __construct(string $invalidRegion) | ||
{ | ||
$message = | ||
"Invalid region '$invalidRegion' detected. Valid regions are " . | ||
implode(", ", Cluster::VALID_REGIONS) . | ||
"."; | ||
parent::__construct($message, 500, [ | ||
"invalidRegion" => $invalidRegion, | ||
"validRegions" => Cluster::VALID_REGIONS, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.