From 602a6cca7d6a07c89dfa9ced2f27e1950984c672 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 4 Feb 2019 18:35:52 +1030 Subject: [PATCH] Make ResourceNotFoundException message informative for individual resources --- src/Exception/ResourceNotFoundException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exception/ResourceNotFoundException.php b/src/Exception/ResourceNotFoundException.php index e83407f..642381b 100644 --- a/src/Exception/ResourceNotFoundException.php +++ b/src/Exception/ResourceNotFoundException.php @@ -10,7 +10,7 @@ class ResourceNotFoundException extends RuntimeException public function __construct(string $type, $id = null) { - parent::__construct("Resource [$type] not found."); + parent::__construct("Resource [$type".($id !== null ? ".$id" : '').'] not found.'); $this->type = $type; }