diff options
author | Brent Shaffer <betterbrent@google.com> | 2018-04-09 14:08:58 -0700 |
---|---|---|
committer | Paul Yang <TeBoring@users.noreply.github.com> | 2018-04-09 14:08:58 -0700 |
commit | 13e627ad691f7645d03c7552ac469c2988397200 (patch) | |
tree | 82b0fc31bc799c5f481db404e6e5e062464a5b6f /php/src/Google | |
parent | 451e0446abc40f46b5941c3feedb111e920c9959 (diff) |
includes the expected class in the exception, otherwise the error is harder to track down (#3371)
Diffstat (limited to 'php/src/Google')
-rw-r--r-- | php/src/Google/Protobuf/Internal/GPBUtil.php | 2 |
1 files changed, 1 insertions, 1 deletions
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."); } } |