Skip to content

Commit 13e627a

Browse files
bshafferTeBoring
authored andcommitted
includes the expected class in the exception, otherwise the error is harder to track down (protocolbuffers#3371)
1 parent 451e044 commit 13e627a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php/src/Google/Protobuf/Internal/GPBUtil.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public static function checkBool(&$var)
194194
public static function checkMessage(&$var, $klass)
195195
{
196196
if (!$var instanceof $klass && !is_null($var)) {
197-
throw new \Exception("Expect message.");
197+
throw new \Exception("Expect $klass.");
198198
}
199199
}
200200

0 commit comments

Comments
 (0)