@@ -1189,7 +1189,7 @@ protected function _buildLimit ($numRows) {
1189
1189
protected function _prepareQuery ()
1190
1190
{
1191
1191
if (!$ stmt = $ this ->mysqli ()->prepare ($ this ->_query )) {
1192
- trigger_error ("Problem preparing query ( $ this ->_query ) " . $ this ->mysqli ()->error , E_USER_ERROR );
1192
+ throw new Exception ("Problem preparing query ( $ this ->_query ) " . $ this ->mysqli ()->error );
1193
1193
}
1194
1194
if ($ this ->traceEnabled )
1195
1195
$ this ->traceStartQ = microtime (true );
@@ -1314,7 +1314,7 @@ public function interval ($diff, $func = "NOW()") {
1314
1314
if (!empty ($ matches [2 ])) $ items = $ matches [2 ];
1315
1315
if (!empty ($ matches [3 ])) $ type = $ matches [3 ];
1316
1316
if (!in_array ($ type , array_keys ($ types )))
1317
- trigger_error ("invalid interval type in ' {$ diff }' " );
1317
+ throw new Exception ("invalid interval type in ' {$ diff }' " );
1318
1318
$ func .= " " .$ incr ." interval " . $ items ." " .$ types [$ type ] . " " ;
1319
1319
}
1320
1320
return $ func ;
@@ -1341,7 +1341,7 @@ public function now ($diff = null, $func = "NOW()") {
1341
1341
*/
1342
1342
public function inc ($ num = 1 ) {
1343
1343
if (!is_numeric ($ num )){
1344
- trigger_error ('Argument supplied to inc must be a number ' , E_USER_ERROR );
1344
+ throw new Exception ('Argument supplied to inc must be a number ' );
1345
1345
}
1346
1346
return Array ("[I] " => "+ " . $ num );
1347
1347
}
@@ -1352,7 +1352,7 @@ public function inc($num = 1) {
1352
1352
*/
1353
1353
public function dec ($ num = 1 ) {
1354
1354
if (!is_numeric ($ num )){
1355
- trigger_error ('Argument supplied to dec must be a number ' , E_USER_ERROR );
1355
+ throw new Exception ('Argument supplied to dec must be a number ' );
1356
1356
}
1357
1357
return Array ("[I] " => "- " . $ num );
1358
1358
}
@@ -1487,4 +1487,3 @@ public function tableExists ($tables) {
1487
1487
return $ this ->count == $ count ;
1488
1488
}
1489
1489
} // END class
1490
- ?>
0 commit comments