Skip to content

Commit 9683fa1

Browse files
committed
Changed trigger_error to throw new exception
1 parent 781c3b0 commit 9683fa1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/testsoap.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* @param $config
1111
*
1212
* @return \SoapClient
13+
* @throws Exception
1314
*/
1415
function getDbTunnel($tunnel_url, $config){
1516

@@ -24,8 +25,9 @@ function getDbTunnel($tunnel_url, $config){
2425
$db->setConfig($config);
2526

2627
} catch (SoapFault $fault) {
27-
trigger_error("SOAP-Error: (Error No: {$fault->faultcode}, "
28-
. "Error: {$fault->faultstring})", E_USER_ERROR);
28+
$errorMsg = "SOAP-Error: (Error No: {$fault->faultcode}, "
29+
. "Error: {$fault->faultstring})";
30+
throw new Exception($errorMsg);
2931
}
3032
return $db;
3133
}

0 commit comments

Comments
 (0)