includes the expected class in the exception, otherwise the error is harder to track down (#3371)

This commit is contained in:
Brent Shaffer 2018-04-09 14:08:58 -07:00 committed by Paul Yang
parent 451e0446ab
commit 13e627ad69

View File

@ -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.");
}
}