Fix DB::exec method, add sql error info to exception.