try
  query.open;
except
  raise exception.create('写上你要写的东东')
  exit;
end;