@@ -101,15 +101,15 @@ public function __call($method,$params) {
101101
102102 // check
103103 if (!is_scalar ($ method )) {
104- throw new Exception ('Method name has no scalar value ' );
104+ throw new \ Exception ('Method name has no scalar value ' );
105105 }
106106
107107 // check
108108 if (is_array ($ params )) {
109109 // no keys
110110 $ params = array_values ($ params );
111111 } else {
112- throw new Exception ('Params must be given as array ' );
112+ throw new \ Exception ('Params must be given as array ' );
113113 }
114114
115115 // sets notification or request task
@@ -146,7 +146,7 @@ public function __call($method,$params) {
146146 curl_setopt ($ ch , CURLOPT_POSTFIELDS , $ request );
147147 $ response = curl_exec ($ ch );
148148 if ( $ response === false ) {
149- throw new Exception ('Unable to connect to ' .$ this ->url );
149+ throw new \ Exception ('Unable to connect to ' .$ this ->url );
150150 }
151151 } else {
152152 if ($ fp = fopen ($ this ->url , 'r ' , false , $ context )) {
@@ -155,7 +155,7 @@ public function __call($method,$params) {
155155 $ response .= trim ($ row )."\n" ;
156156 }
157157 } else {
158- throw new Exception ('Unable to connect to ' .$ this ->url );
158+ throw new \ Exception ('Unable to connect to ' .$ this ->url );
159159 }
160160 }
161161 $ this ->debug && $ this ->debug .='***** Response ***** ' ."\n" .$ response ."\n" .'***** End of Response ***** ' ."\n\n" ;
@@ -184,4 +184,4 @@ public function __call($method,$params) {
184184 }
185185 }
186186}
187- ?>
187+ ?>
0 commit comments