[R] on error execute:

jcress410 boywonder410 at gmail.com
Thu Sep 9 01:37:21 CEST 2010


So, i've been writing code in R interfacing with mysql, its been fun and the
documentation has been useful, learning quite a bit. 

the only annoying thing i've been encountering is while coding/debugging, my
session gets clogged, especially with sql connections.  At the end of the
code i dbDisconnect, but when the script is stopped by an error, the session
stays open. 

Usually i'll remember to ls() and dbDisconnect at console manually, though,
sometimes I forget and wind up with a bunch of extra connections.   

A couple of questions:

First: is there a way to tell R to execute some commands before dumping back
to console on error, 

and/or 

second: is there a way to capture error messages and continue executing?  

Sorry if this has been addressed already, but, even aided by the new awesome
google i haven't been able to find it. 
-- 
View this message in context: http://r.789695.n4.nabble.com/on-error-execute-tp2532190p2532190.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list