From 13e627ad691f7645d03c7552ac469c2988397200 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Mon, 9 Apr 2018 14:08:58 -0700 Subject: includes the expected class in the exception, otherwise the error is harder to track down (#3371) --- php/src/Google/Protobuf/Internal/GPBUtil.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'php/src/Google') diff --git a/php/src/Google/Protobuf/Internal/GPBUtil.php b/php/src/Google/Protobuf/Internal/GPBUtil.php index 76f84cbd..05d5c393 100644 --- a/php/src/Google/Protobuf/Internal/GPBUtil.php +++ b/php/src/Google/Protobuf/Internal/GPBUtil.php @@ -194,7 +194,7 @@ class GPBUtil public static function checkMessage(&$var, $klass) { if (!$var instanceof $klass && !is_null($var)) { - throw new \Exception("Expect message."); + throw new \Exception("Expect $klass."); } } -- cgit v1.2.3