Commit 13e627ad authored by Brent Shaffer's avatar Brent Shaffer Committed by Paul Yang

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

parent 451e0446
......@@ -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.");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment