Re: [R] Error messages and C

2004-08-20 Thread Thomas Lumley
On Fri, 20 Aug 2004, Ross Boylan wrote: I am calling a C (C++ really) function via the .C interface. Sometimes when things go wrong I want to return an error message. 1. R provides C functions error and warning which look about right. But exactly how does this exit, and in particular what

RE: [R] Error messages and C

2004-08-20 Thread Vadim Ogranovich
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ross Boylan Sent: Friday, August 20, 2004 11:35 AM To: r-help Subject: [R] Error messages and C I am calling a C (C++ really) function via the .C interface. Sometimes when things go wrong I want to

Re: [R] Error messages and C

2004-08-20 Thread Ross Boylan
On Fri, 2004-08-20 at 12:04, Thomas Lumley wrote: On Fri, 20 Aug 2004, Ross Boylan wrote: I am calling a C (C++ really) function via the .C interface. Sometimes when things go wrong I want to return an error message. 1. R provides C functions error and warning which look about right.

Re: [R] Error messages and C

2004-08-20 Thread Thomas Lumley
On Fri, 20 Aug 2004, Ross Boylan wrote: The weak references cleaned up are R objects, and my stuff is mostly non-R objects. I see two possible ways to get this to work: 1) Create some kind of dummy R object with a finalizer that cleans up my C++ objects. That's the approach used in that web