This repository has been archived by the owner on Oct 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
95 additions
and
9 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,14 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Dynamap\Exception; | ||
|
||
class ItemNotFound extends \Exception | ||
{ | ||
/** | ||
* @param int|string|array $key | ||
*/ | ||
public static function fromKey(string $className, $key): self | ||
{ | ||
return new self("Item `$className` not found for key " . json_encode($key)); | ||
} | ||
} |
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,19 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Dynamap\Exception; | ||
|
||
use Aws\DynamoDb\Exception\DynamoDbException; | ||
|
||
/** | ||
* The table was not found. | ||
*/ | ||
class TableNotFound extends \Exception | ||
{ | ||
public static function tableMissingInDynamoDb(string $table, DynamoDbException $previous): self | ||
{ | ||
$message = "Cannot find the table `$table` in DynamoDB: make sure it exists and that the code has permissions to access it. " | ||
. $previous->getAwsErrorMessage(); | ||
|
||
return new self($message, 0, $previous); | ||
} | ||
} |
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