Re: [R] catching errors in RNetCDF

2012-12-06 Thread Jannis
Hi Pascal, Well, as i see it, this is no error, just a simple message printed to the screen claiming that it is an error. All the mechanisms in R to handle errors (e.g a stop of code execution etc) are, however, not initiated. Cheers Jannis On 06.12.2012 02:53, Pascal Oettli wrote: Hi,

Re: [R] catching errors in RNetCDF

2012-12-06 Thread Pascal Oettli
Hi Jannis, The variable is not found. That is why there is an error. Every time I get an error message using 'RNetCDF', I am able to debug the code. Regards, Pascal Le 06/12/2012 20:41, Jannis a écrit : Hi Pascal, Well, as i see it, this is no error, just a simple message printed to the

Re: [R] catching errors in RNetCDF

2012-12-06 Thread Michael Sumner
Do you want to cause an error or catch one? Try removing the try() and see if that helps. This has nothing to do with RNetCDF you could as easily have caught another more basic error. On Thursday, December 6, 2012, Jannis wrote: Hi Pascal, Well, as i see it, this is no error, just a simple

Re: [R] catching errors in RNetCDF

2012-12-06 Thread Jannis
Thanks Michael and Pascal for your replies, sorry if I did not formulate my post precisely enough. My example code was meant to produce an error to demonstrate the behaviour that I interpretet as not causing real R errors. Also without the try() funtion around it to me it seems that just

[R] catching errors in RNetCDF

2012-12-05 Thread Jannis
Dear R community, I quite frequently run into errors while using the RNetCDF package which do not seem to be recognised as normal R errors and, hence, do not stop the execution of the code making it hard to debug the code. Consider, for example: library(RNetCDF) con - create.nc('test.nc')

Re: [R] catching errors in RNetCDF

2012-12-05 Thread Pascal Oettli
Hi, When I try your example, I simply get an error: library(RNetCDF) con - create.nc('test.nc') test - try(var.get.nc(con, 'dummy')) Error : NetCDF: Variable not found Regards, Pascal Le 05/12/2012 22:08, Jannis a écrit : Dear R community, I quite frequently run into errors while using