From c0e827c303b8228e64d461a9719ada6eaef7c61a Mon Sep 17 00:00:00 2001 From: gggeek Date: Tue, 24 Mar 2015 13:58:33 +0000 Subject: [PATCH] When serialize() is invoked on a response and its payload can not be serialized, an exception is thrown instead of ending all execution --- src/Response.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Response.php b/src/Response.php index 54e8db4a..626fd64f 100644 --- a/src/Response.php +++ b/src/Response.php @@ -105,6 +105,8 @@ class Response * @param string $charsetEncoding the charset to be used for serialization. if null, US-ASCII is assumed * * @return string the xml representation of the response + * + * @throws \Exception */ public function serialize($charsetEncoding = '') { @@ -134,7 +136,7 @@ class Response "\n"; } else { /// @todo try to build something serializable? - die('cannot serialize xmlrpc response objects whose content is native php values'); + throw new \Exception('cannot serialize xmlrpc response objects whose content is native php values'); } } else { $result .= "\n\n" . -- 2.47.0