#688294 by Berdir, andypost, Crell, catch: Fixed Switch from db_is_active() to proper exception catching.