Community Documentation

Error handling

Last updated January 2, 2010. Created by willmoy on January 2, 2010.
Log in to edit this page.

The Database API throws exceptions on error, which can be picked up by wrapping your database operations in try {} catch() {} blocks, as shown in the last example at: http://api.drupal.org/api/group/database/7.