From Waclaw.Marcin.Kusnierczyk at idi.ntnu.no  Sun Feb 22 21:06:03 2009
From: Waclaw.Marcin.Kusnierczyk at idi.ntnu.no (Wacek Kusnierczyk)
Date: Sun, 22 Feb 2009 21:06:03 +0100
Subject: [Rd] 'unique' error message is printed despite
	silent=TRUE	(PR#13547)
In-Reply-To: <20090222191519.17912282C76C@mail.pubhealth.ku.dk>
References: <20090222191519.17912282C76C@mail.pubhealth.ku.dk>
Message-ID: <49A1B02B.4060903@idi.ntnu.no>

macrakis at alum.mit.edu wrote:
> In 2.8.0/Windows Vista:
>
> When 'unique' gives a type error message, it prints out even if errors
> are being caught:
>
>   
>> try(unique(quote(hello)),silent=TRUE)
>>     
> hello
>
> This comes from the .Internal unique routine:
>
>   
>> try(.Internal(unique(quote(hello),NULL,NULL)),silent=TRUE)
>>     
> hello
>
> I guess it is using the internal equivalent of print rather than the
> internal equivalent of stop.
>
>   
line 454+ in src/main/unique.c:

    if (!isVector(x)) {
    PrintValue(x);
    error(_("%s() applies only to vectors"),
          (PRIMVAL(op) == 0 ? "duplicated" : "unique"));
    }

in your example, quote() produces a non-vector, hence the output before
the error message.

vQ



[Rd] 'unique' error message is printed despite silent=TRUE (PR#13547)
Wacek Kusnierczyk