@@ -1190,7 +1190,7 @@ protected function _buildLimit ($numRows) {
1190
1190
protected function _prepareQuery ()
1191
1191
{
1192
1192
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 );
1194
1194
}
1195
1195
if ($ this ->traceEnabled )
1196
1196
$ this ->traceStartQ = microtime (true );
@@ -1315,7 +1315,7 @@ public function interval ($diff, $func = "NOW()") {
1315
1315
if (!empty ($ matches [2 ])) $ items = $ matches [2 ];
1316
1316
if (!empty ($ matches [3 ])) $ type = $ matches [3 ];
1317
1317
if (!in_array ($ type , array_keys ($ types )))
1318
- trigger_error ("invalid interval type in ' {$ diff }' " );
1318
+ throw new Exception ("invalid interval type in ' {$ diff }' " );
1319
1319
$ func .= " " .$ incr ." interval " . $ items ." " .$ types [$ type ] . " " ;
1320
1320
}
1321
1321
return $ func ;
@@ -1342,7 +1342,7 @@ public function now ($diff = null, $func = "NOW()") {
1342
1342
*/
1343
1343
public function inc ($ num = 1 ) {
1344
1344
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 ' );
1346
1346
}
1347
1347
return Array ("[I] " => "+ " . $ num );
1348
1348
}
@@ -1353,7 +1353,7 @@ public function inc($num = 1) {
1353
1353
*/
1354
1354
public function dec ($ num = 1 ) {
1355
1355
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 ' );
1357
1357
}
1358
1358
return Array ("[I] " => "- " . $ num );
1359
1359
}
@@ -1488,4 +1488,3 @@ public function tableExists ($tables) {
1488
1488
return $ this ->count == $ count ;
1489
1489
}
1490
1490
} // END class
1491
- ?>
0 commit comments