Hi,
You can connect to a database yourself and then pass the connection to R::setup().
Personally I like to catch all exceptions at top level, like this:
try{ $app->run(); }catch(Exception $e ){
log_error($e); serveErrorPage();
}
Also make sure you turn error reporting off on production servers!
On a production server you log the errors and exceptions but you never should display them to the user.
cheers,
Gabor