diff --git a/php/src/Google/Protobuf/Internal/Message.php b/php/src/Google/Protobuf/Internal/Message.php index a427e4889f..21d9c980e0 100644 --- a/php/src/Google/Protobuf/Internal/Message.php +++ b/php/src/Google/Protobuf/Internal/Message.php @@ -1314,7 +1314,7 @@ class Message try { $this->mergeFromJsonArray($array, $ignore_unknown); } catch (\Exception $e) { - throw new GPBDecodeException($e->getMessage()); + throw new GPBDecodeException($e->getMessage(), $e->getCode(), $e); } }