@@ -1190,7 +1190,7 @@ protected function _buildLimit ($numRows) {
11901190 protected function _prepareQuery ()
11911191 {
11921192 if (!$ stmt = $ this ->mysqli ()->prepare ($ this ->_query )) {
1193- trigger_error ("Problem preparing query ( $ this ->_query ) " . $ this ->mysqli ()->error , E_USER_ERROR );
1193+ throw new Exception ("Problem preparing query ( $ this ->_query ) " . $ this ->mysqli ()->error );
11941194 }
11951195 if ($ this ->traceEnabled )
11961196 $ this ->traceStartQ = microtime (true );
@@ -1315,7 +1315,7 @@ public function interval ($diff, $func = "NOW()") {
13151315 if (!empty ($ matches [2 ])) $ items = $ matches [2 ];
13161316 if (!empty ($ matches [3 ])) $ type = $ matches [3 ];
13171317 if (!in_array ($ type , array_keys ($ types )))
1318- trigger_error ("invalid interval type in ' {$ diff }' " );
1318+ throw new Exception ("invalid interval type in ' {$ diff }' " );
13191319 $ func .= " " .$ incr ." interval " . $ items ." " .$ types [$ type ] . " " ;
13201320 }
13211321 return $ func ;
@@ -1342,7 +1342,7 @@ public function now ($diff = null, $func = "NOW()") {
13421342 */
13431343 public function inc ($ num = 1 ) {
13441344 if (!is_numeric ($ num )){
1345- trigger_error ('Argument supplied to inc must be a number ' , E_USER_ERROR );
1345+ throw new Exception ('Argument supplied to inc must be a number ' );
13461346 }
13471347 return Array ("[I] " => "+ " . $ num );
13481348 }
@@ -1353,7 +1353,7 @@ public function inc($num = 1) {
13531353 */
13541354 public function dec ($ num = 1 ) {
13551355 if (!is_numeric ($ num )){
1356- trigger_error ('Argument supplied to dec must be a number ' , E_USER_ERROR );
1356+ throw new Exception ('Argument supplied to dec must be a number ' );
13571357 }
13581358 return Array ("[I] " => "- " . $ num );
13591359 }
@@ -1488,4 +1488,3 @@ public function tableExists ($tables) {
14881488 return $ this ->count == $ count ;
14891489 }
14901490} // END class
1491- ?>
0 commit comments