diff options
author | jim-p <jimp@pfsense.org> | 2017-04-04 14:47:35 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2017-04-04 14:48:09 -0400 |
commit | 593f052172b0969dfe9e9db755a9a41200e67ab1 (patch) | |
tree | ac683fafac328bfe7a607219fde3727e6fe21d3c /src/etc/inc/xmlrpc_client.inc | |
parent | 421907192bc11c1aa1787d8c139dcd0e1f110c15 (diff) | |
download | pfsense-593f052172b0969dfe9e9db755a9a41200e67ab1.zip pfsense-593f052172b0969dfe9e9db755a9a41200e67ab1.tar.gz |
Improve XMLRPC failure messages/exception handling. Fixes #7448
Diffstat (limited to 'src/etc/inc/xmlrpc_client.inc')
-rw-r--r-- | src/etc/inc/xmlrpc_client.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/etc/inc/xmlrpc_client.inc b/src/etc/inc/xmlrpc_client.inc index 26a93be..962265d 100644 --- a/src/etc/inc/xmlrpc_client.inc +++ b/src/etc/inc/xmlrpc_client.inc @@ -111,7 +111,8 @@ class pfsense_xmlrpc_client { if ($previouserror == null) { // CurlException doesnt get filled with PreviousError, // however we dont want to show the stacktrace included in the 'message' to non sysadmin users - $this->error = "CurlException calling XMLRPC method {$method} #" . $e->getMessage(); + preg_match("/HTTP_Request2_ConnectionException: (.*) in \/.*/", $e->getMessage(), $errormsg); + $this->error = "A communications error occurred while attempting to call XMLRPC method {$method}: " . $errormsg[1]; } else { $this->error = "CurlException calling XMLRPC method {$method} #" . $previouserror->getMessage(); } |