ComputerScienceHouse / WebDrink-2.0

Rewrite of CSH WebDrink. Includes updated interface and new API.
https://webdrink.csh.rit.edu
10 stars 6 forks source link

Fix db_utils exception handling #37

Closed bencentra closed 10 years ago

bencentra commented 10 years ago

Right now, it just dies if it encounters an exception. I'd rather it return false and guess at why than have it just crash.

bencentra commented 10 years ago

It still dies when SQL exceptions are encountered, but empty result sets don't register as errors.

bencentra commented 10 years ago

Fixed by forcing exceptions on error in dbInfo.inc, better exception catching in db_utils.php, and strict type checking on query results in drink_api.php