[Rprotobuf-commits] r609 - pkg/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Dec 27 22:10:36 CET 2013
Author: murray
Date: 2013-12-27 22:10:36 +0100 (Fri, 27 Dec 2013)
New Revision: 609
Modified:
pkg/src/extractors.cpp
pkg/src/mutators.cpp
pkg/src/rprotobuf.cpp
pkg/src/rprotobuf.h
pkg/src/wrapper_EnumDescriptor.cpp
pkg/src/wrapper_FieldDescriptor.cpp
pkg/src/wrapper_Message.cpp
pkg/src/wrapper_ServiceDescriptor.cpp
Log:
Oops, s/Rcpp::throw/Rcpp::stop/.
Modified: pkg/src/extractors.cpp
===================================================================
--- pkg/src/extractors.cpp 2013-12-27 20:04:29 UTC (rev 608)
+++ pkg/src/extractors.cpp 2013-12-27 21:10:36 UTC (rev 609)
@@ -42,7 +42,7 @@
// This should not happen, its a bug in the code.
string message = string("Error converting int64 to string, unset ") +
kIntStringOptionName + " option.";
- Rcpp::throw(message.c_str());
+ Rcpp::stop(message.c_str());
}
return Rcpp::CharacterVector(ss.str());
} else {
@@ -139,11 +139,11 @@
}
return res;
} else {
- Rcpp::throw("unknown field type with CPP_TYPE STRING");
+ Rcpp::stop("unknown field type with CPP_TYPE STRING");
}
default:
- Rcpp::throw("Unsupported type");
+ Rcpp::stop("Unsupported type");
}
} else {
@@ -176,7 +176,7 @@
std::string s = ref->GetString(*message, fieldDesc);
return Rcpp::wrap(std::vector<Rbyte>(s.begin(), s.end()));
} else {
- Rcpp::throw("unknown field type with CPP_TYPE STRING");
+ Rcpp::stop("unknown field type with CPP_TYPE STRING");
}
case CPPTYPE_ENUM :
return Rcpp::wrap( ref->GetEnum( *message, fieldDesc )->number() ) ;
@@ -186,7 +186,7 @@
break ;
default:
- Rcpp::throw("Unsupported type");
+ Rcpp::stop("Unsupported type");
}
}
Modified: pkg/src/mutators.cpp
===================================================================
--- pkg/src/mutators.cpp 2013-12-27 20:04:29 UTC (rev 608)
+++ pkg/src/mutators.cpp 2013-12-27 21:10:36 UTC (rev 609)
@@ -35,7 +35,6 @@
*/
/* FIXME: should we convert the NA's */
double GET_double( SEXP x, int index ){
- try {
switch( TYPEOF(x) ){
case INTSXP:
return( (double)INTEGER(x)[index] ) ;
@@ -46,17 +45,13 @@
case RAWSXP:
return( (double)RAW(x)[index] ) ;
default:
- Rcpp::throw("cannot cast SEXP to double");
+ Rcpp::stop("cannot cast SEXP to double");
}
- } catch(std::exception &ex) {
- forward_exception_to_r(ex);
- }
return 0.0 ; // -Wall
}
// }}}
float GET_float( SEXP x, int index ){
- try {
switch( TYPEOF(x) ){
case INTSXP:
return( (float)INTEGER(x)[index] ) ;
@@ -67,16 +62,12 @@
case RAWSXP:
return( (float)RAW(x)[index] ) ;
default:
- Rcpp::throw("cannot cast SEXP to double");
+ Rcpp::stop("cannot cast SEXP to double");
}
- } catch(std::exception &ex) {
- forward_exception_to_r(ex);
- }
return (float)0.0 ; // -Wall
}
int GET_int( SEXP x, int index ){
- try {
switch( TYPEOF(x) ){
case INTSXP:
return( INTEGER(x)[index] );
@@ -87,48 +78,36 @@
case RAWSXP:
return( (int)RAW(x)[index] ) ;
default:
- Rcpp::throw( "cannot cast SEXP to int" );
+ Rcpp::stop( "cannot cast SEXP to int" );
}
- } catch(std::exception &ex) {
- forward_exception_to_r(ex);
- }
return 0 ; // -Wall, should not happen since we only call this when we know it works
}
template<typename ValueType>
ValueType Int64FromString(const string &value) {
- try {
std::stringstream ss(value);
ValueType ret;
if ((ss >> ret).fail() || !(ss>>std::ws).eof()) {
string message = "Provided character value '" + value +
"' cannot be cast to 64-bit integer.";
- Rcpp::throw(message.c_str());
+ Rcpp::stop(message.c_str());
}
return ret;
- } catch(std::exception &ex) {
- forward_exception_to_r(ex);
- }
}
template<typename ValueType>
ValueType Int32FromString(const string &value) {
- try {
std::stringstream ss(value);
ValueType ret;
if ((ss >> ret).fail() || !(ss>>std::ws).eof()) {
string message = "Provided character value '" + value +
"' cannot be cast to 32-bit integer.";
- Rcpp::throw(message.c_str());
+ Rcpp::stop(message.c_str());
}
return ret;
- } catch(std::exception &ex) {
- forward_exception_to_r(ex);
- }
}
int32 GET_int32( SEXP x, int index ){
- try {
switch( TYPEOF(x) ){
case INTSXP:
return( (int32)INTEGER(x)[index] );
@@ -141,16 +120,12 @@
case STRSXP:
return Int32FromString<int32>(CHAR(STRING_ELT(x, index)));
default:
- Rcpp::throw( "cannot cast SEXP to int32");
+ Rcpp::stop( "cannot cast SEXP to int32");
}
- } catch(std::exception &ex) {
- forward_exception_to_r(ex);
- }
return (int32)0 ; // -Wall, should not happen since we only call this when we know it works
}
int64 GET_int64( SEXP x, int index ){
- try {
switch( TYPEOF(x) ){
case INTSXP:
return( (int64)INTEGER(x)[index] );
@@ -163,16 +138,12 @@
case STRSXP:
return Int64FromString<int64>(CHAR(STRING_ELT(x, index)));
default:
- Rcpp::throw("cannot cast SEXP to int64");
+ Rcpp::stop("cannot cast SEXP to int64");
}
- } catch(std::exception &ex) {
- forward_exception_to_r(ex);
- }
return (int64)0 ; // -Wall, should not happen since we only call this when we know it works
}
uint32 GET_uint32( SEXP x, int index ){
- try {
switch( TYPEOF(x) ){
case INTSXP:
return( (uint32)INTEGER(x)[index] );
@@ -185,16 +156,12 @@
case STRSXP:
return Int32FromString<uint32>(CHAR(STRING_ELT(x, index)));
default:
- Rcpp::throw("cannot cast SEXP to uint32");
+ Rcpp::stop("cannot cast SEXP to uint32");
}
- } catch(std::exception &ex) {
- forward_exception_to_r(ex);
- }
return (uint32)0 ; // -Wall, should not happen since we only call this when we know it works
}
uint64 GET_uint64( SEXP x, int index ){
- try {
switch( TYPEOF(x) ){
case INTSXP:
return( (uint64)INTEGER(x)[index] );
@@ -207,43 +174,36 @@
case STRSXP:
return Int64FromString<uint64>(CHAR(STRING_ELT(x, index)));
default:
- Rcpp::throw("cannot cast SEXP to uint64");
+ Rcpp::stop("cannot cast SEXP to uint64");
}
- } catch(std::exception &ex) {
- forward_exception_to_r(ex);
- }
return (uint64)0 ; // -Wall, should not happen since we only call this when we know it works
}
bool GET_bool( SEXP x, int index ){
- try {
switch( TYPEOF(x) ){
case INTSXP:
if (INTEGER(x)[index] == R_NaInt) {
- Rcpp::throw("NA boolean values can not be stored in "
+ Rcpp::stop("NA boolean values can not be stored in "
"bool protocol buffer fields");
}
return( (bool)INTEGER(x)[index] );
case REALSXP:
if (REAL(x)[index] == R_NaReal) {
- Rcpp::throw("NA boolean values can not be stored in "
+ Rcpp::stop("NA boolean values can not be stored in "
"bool protocol buffer fields");
}
return( (bool)REAL(x)[index] );
case LGLSXP:
if (LOGICAL(x)[index] == NA_LOGICAL) {
- Rcpp::throw("NA boolean values can not be stored in "
+ Rcpp::stop("NA boolean values can not be stored in "
"bool protocol buffer fields");
}
return( (bool)LOGICAL(x)[index] );
case RAWSXP:
return( (bool)RAW(x)[index] ) ;
default:
- Rcpp::throw("cannot cast SEXP to bool");
+ Rcpp::stop("cannot cast SEXP to bool");
}
- } catch(std::exception &ex) {
- forward_exception_to_r(ex);
- }
return (bool)0 ; // -Wall, should not happen since we only call this when we know it works
}
@@ -255,26 +215,22 @@
}
std::string GET_bytes( SEXP x, int index ){
- try {
switch( TYPEOF(x)) {
case RAWSXP:
if (index == 0) {
return(std::string((const char *) RAW(x), (size_t) LENGTH(x)));
} else {
- Rcpp::throw("cannot cast SEXP to bytes");
+ Rcpp::stop("cannot cast SEXP to bytes");
}
case VECSXP:
if (TYPEOF(VECTOR_ELT(x, index)) == RAWSXP) {
return(std::string((const char *) RAW(VECTOR_ELT(x, index)), (size_t) LENGTH(VECTOR_ELT(x, index))));
} else {
- Rcpp::throw("cannot cast SEXP to bytes");
+ Rcpp::stop("cannot cast SEXP to bytes");
}
default:
- Rcpp::throw("cannot cast SEXP to bytes");
+ Rcpp::stop("cannot cast SEXP to bytes");
}
- } catch(std::exception &ex) {
- forward_exception_to_r(ex);
- }
return "" ; // -Wall, should not happen since we only call this when we know it works
}
@@ -359,7 +315,7 @@
}
}
if( !ok ){
- Rcpp::throw("wrong value for enum");
+ Rcpp::stop("wrong value for enum");
}
}
@@ -388,7 +344,7 @@
}
}
if( !ok ){
- Rcpp::throw("wrong value for enum");
+ Rcpp::stop("wrong value for enum");
}
}
break ;
@@ -396,7 +352,7 @@
// }}}
default:
- Rcpp::throw("impossible to convert to a enum");
+ Rcpp::stop("impossible to convert to a enum");
}
VOID_END_RCPP
}
@@ -407,7 +363,7 @@
void CHECK_messages( const GPB::FieldDescriptor* field_desc, SEXP values ){
BEGIN_RCPP
if( TYPEOF( values ) != VECSXP ){
- Rcpp::throw("expecting a list of messages");
+ Rcpp::stop("expecting a list of messages");
}
const char* target = field_desc->message_type()->full_name().c_str() ;
@@ -415,7 +371,7 @@
for( int i=0; i<n; i++){
if( !isMessage( VECTOR_ELT(values, i), target ) ){
/* TODO: include i, target type and actual type in the message */
- Rcpp::throw("incorrect type");
+ Rcpp::stop("incorrect type");
}
}
VOID_END_RCPP
@@ -428,7 +384,6 @@
*/
void CHECK_repeated_vals(const GPB::FieldDescriptor* field_desc,
SEXP value, int value_size) {
- BEGIN_RCPP
switch( field_desc->type() ){
case TYPE_MESSAGE:
case TYPE_GROUP:
@@ -447,13 +402,13 @@
/* check that this is a message of the appropriate type */
if( !isMessage( value,
field_desc->message_type()->full_name().c_str() ) ){
- Rcpp::throw("incorrect type");
+ Rcpp::stop("incorrect type");
}
break ;
}
default:
{
- Rcpp::("impossible to convert to a message");
+ Rcpp::stop("impossible to convert to a message");
}
}
break ;
@@ -492,7 +447,7 @@
}
}
if( !ok ){
- Rcpp::throw("wrong value for enum");
+ Rcpp::stop("wrong value for enum");
}
}
break ;
@@ -520,7 +475,7 @@
}
}
if( !ok ){
- Rcpp::throw("wrong value for enum");
+ Rcpp::stop("wrong value for enum");
}
}
@@ -529,7 +484,7 @@
// }}}
default:
- Rcpp::throw("impossible to convert to a enum");
+ Rcpp::stop("impossible to convert to a enum");
}
break ;
}
@@ -553,7 +508,6 @@
}
}
// }}}
- VOID_END_RCPP
}
/**
@@ -572,7 +526,7 @@
const GPB::FieldDescriptor* field_desc,
SEXP value, int value_size) {
if (value_size > 1) {
- Rcpp::throw("cannot set non-repeated field to vector of length > 1");
+ Rcpp::stop("cannot set non-repeated field to vector of length > 1");
}
switch( GPB::FieldDescriptor::TypeToCppType( field_desc->type() ) ){
// {{{ simple cases using macro expansion
@@ -591,15 +545,15 @@
// TODO(mstokely): Rcpp should handle this!
if ((TYPEOF(value) == LGLSXP) &&
(LOGICAL(value)[0] == NA_LOGICAL)) {
- Rcpp::throw("NA boolean values can not be stored in "
+ Rcpp::stop("NA boolean values can not be stored in "
"bool protocol buffer fields");
} else if ((TYPEOF(value) == INTSXP) &&
(INTEGER(value)[0] == R_NaInt)) {
- Rcpp::throw("NA boolean values can not be stored in "
+ Rcpp::stop("NA boolean values can not be stored in "
"bool protocol buffer fields");
} else if ((TYPEOF(value) == REALSXP) &&
(REAL(value)[0] == R_NaReal)) {
- Rcpp::throw("NA boolean values can not be stored in "
+ Rcpp::stop("NA boolean values can not be stored in "
"bool protocol buffer fields");
}
ref->SetBool(message, field_desc, Rcpp::as<bool>(value));
@@ -667,7 +621,7 @@
#endif
#undef HANDLE_SINGLE_FIELD
default:
- Rcpp::throw("Unsupported type");
+ Rcpp::stop("Unsupported type");
// }}}
// {{{ string
@@ -689,7 +643,7 @@
{
/* check if value is a message */
if( !Rf_inherits( value, "Message" ) ){
- Rcpp::throw("Can only convert S4 objects of class 'Message'");
+ Rcpp::stop("Can only convert S4 objects of class 'Message'");
}
GPB::Message* __mess = GET_MESSAGE_POINTER_FROM_S4(value);
ref->SetString(message, field_desc,
@@ -698,7 +652,7 @@
}
default:
{
- Rcpp::throw("Cannot convert to string");
+ Rcpp::stop("Cannot convert to string");
}
}
break ;
@@ -713,12 +667,12 @@
const char* type = mess->GetDescriptor()->full_name().c_str() ;
const char* target = field_desc->message_type()->full_name().c_str() ;
if( strcmp( type, target ) ){
- Rcpp::throw("wrong message type");
+ Rcpp::stop("wrong message type");
}
GPB::Message* m = ref->MutableMessage( message, field_desc ) ;
m->CopyFrom( *mess ) ;
} else {
- Rcpp::throw("type mismatch, expecting a 'Message' object");
+ Rcpp::stop("type mismatch, expecting a 'Message' object");
}
break ;
}
@@ -737,7 +691,7 @@
int val = Rcpp::as<int>(value) ;
const GPB::EnumValueDescriptor* evd = enum_desc->FindValueByNumber(val) ;
if( !evd ){
- Rcpp::throw("wrong value for enum");
+ Rcpp::stop("wrong value for enum");
} else {
ref->SetEnum( message, field_desc, evd );
}
@@ -748,7 +702,7 @@
std::string val = Rcpp::as<std::string>( value ) ;
const GPB::EnumValueDescriptor* evd = enum_desc->FindValueByName(val) ;
if( !evd ){
- Rcpp::throw("wrong value for enum");
+ Rcpp::stop("wrong value for enum");
} else {
ref->SetEnum( message, field_desc, evd );
}
@@ -756,7 +710,7 @@
}
default:
{
- Rcpp::throw("cannot set enum value");
+ Rcpp::stop("cannot set enum value");
}
}
}
@@ -831,7 +785,7 @@
default:
{
- Rcpp::throw("Cannot convert to int32");
+ Rcpp::stop("Cannot convert to int32");
}
}
break ;
@@ -869,7 +823,7 @@
}
default:
- Rcpp::throw("Cannot convert to int64");
+ Rcpp::stop("Cannot convert to int64");
}
break ;
}
@@ -903,7 +857,7 @@
break ;
}
default:
- Rcpp::throw("Cannot convert to uint32");
+ Rcpp::stop("Cannot convert to uint32");
}
break ;
}
@@ -937,7 +891,7 @@
break ;
}
default:
- Rcpp::throw("Cannot convert to int64");
+ Rcpp::stop("Cannot convert to int64");
}
break ;
}
@@ -968,7 +922,7 @@
break ;
}
default:
- Rcpp::throw("Cannot convert to double");
+ Rcpp::stop("Cannot convert to double");
}
break ;
}
@@ -1000,7 +954,7 @@
break ;
}
default:
- Rcpp::throw("Cannot convert to float");
+ Rcpp::stop("Cannot convert to float");
}
break ;
}
@@ -1032,7 +986,7 @@
break ;
}
default:
- Rcpp::throw("Cannot convert to bool");
+ Rcpp::stop("Cannot convert to bool");
}
break ;
}
@@ -1083,7 +1037,7 @@
{
/* check if value is a message */
if( !Rf_inherits( value, "Message" ) ){
- Rcpp::throw("Can only convert S4 objects of class 'Message'");
+ Rcpp::stop("Can only convert S4 objects of class 'Message'");
}
GPB::Message* __mess = GET_MESSAGE_POINTER_FROM_S4( value ) ;
ref->SetRepeatedString(message, field_desc, 0,
@@ -1134,7 +1088,7 @@
break ;
}
default:
- Rcpp::throw("Cannot convert to string");
+ Rcpp::stop("Cannot convert to string");
}
break ;
}
@@ -1179,7 +1133,7 @@
}
}
} else{
- Rcpp::throw("type mismatch, expecting a 'Message' object or a list of them");
+ Rcpp::stop("type mismatch, expecting a 'Message' object or a list of them");
}
break ;
}
@@ -1243,7 +1197,7 @@
// {{{ default
default:
{
- Rcpp::throw("cannot set enum value");
+ Rcpp::stop("cannot set enum value");
}
// }}}
}
@@ -1305,7 +1259,7 @@
} else if( TYPEOF(value) == VECSXP && allAreRaws( value ) ){
value_size = LENGTH(value) ;
} else {
- Rcpp::throw("cannot convert to string");
+ Rcpp::stop("cannot convert to string");
}
}
// }}}
Modified: pkg/src/rprotobuf.cpp
===================================================================
--- pkg/src/rprotobuf.cpp 2013-12-27 20:04:29 UTC (rev 608)
+++ pkg/src/rprotobuf.cpp 2013-12-27 21:10:36 UTC (rev 609)
@@ -123,7 +123,7 @@
* @param descriptor a "Descriptor" R object
*/
SEXP newProtoMessage( SEXP descriptor ){
- try {
+ BEGIN_RCPP
#ifdef RPB_DEBUG
Rprintf( "<newProtoMessage>\n" ) ;
/* FIXME: the message type, we don't really need that*/
@@ -148,9 +148,7 @@
#endif
return( S4_Message( message ) ) ;
- } catch(std::exception &ex) {
- forward_exception_to_r(ex);
- }
+ END_RCPP
}
/**
@@ -234,7 +232,7 @@
if (Rf_inherits( name, "FieldDescriptor") ){
field_desc = GET_FIELD_DESCRIPTOR_POINTER_FROM_S4(name);
} else {
- Rcpp::throw("S4 class is not a FieldDescriptor");
+ Rcpp::stop("S4 class is not a FieldDescriptor");
}
break ;
}
@@ -258,7 +256,7 @@
}
}
if( !field_desc ){
- Rcpp::throw(error_message.c_str());
+ Rcpp::stop(error_message.c_str());
}
return field_desc ;
} catch(std::exception &ex) {
Modified: pkg/src/rprotobuf.h
===================================================================
--- pkg/src/rprotobuf.h 2013-12-27 20:04:29 UTC (rev 608)
+++ pkg/src/rprotobuf.h 2013-12-27 21:10:36 UTC (rev 609)
@@ -106,7 +106,7 @@
#define XPP EXTPTR_PTR
#define NEW_S4_OBJECT(CLAZZ) SEXP oo = PROTECT( NEW_OBJECT(MAKE_CLASS(CLAZZ)) ); \
- if (!Rf_inherits(oo, CLAZZ)) throwException(CLAZZ, "CannotCreateObjectException" );
+ if (!Rf_inherits(oo, CLAZZ)) Rcpp::stop(CLAZZ);
namespace rprotobuf{
@@ -130,9 +130,6 @@
RcppExport SEXP getMessageField( SEXP, SEXP );
RcppExport SEXP extractFieldAsSEXP( const Rcpp::XPtr<GPB::Message>& , const GPB::FieldDescriptor* ) ;
-/* in exceptions.cpp */
-RcppExport SEXP throwException( const char*, const char*) ;
-
/* in lookup.cpp */
RcppExport SEXP newProtocolBufferLookup(SEXP) ;
Modified: pkg/src/wrapper_EnumDescriptor.cpp
===================================================================
--- pkg/src/wrapper_EnumDescriptor.cpp 2013-12-27 20:04:29 UTC (rev 608)
+++ pkg/src/wrapper_EnumDescriptor.cpp 2013-12-27 21:10:36 UTC (rev 609)
@@ -70,7 +70,7 @@
const GPB::EnumValueDescriptor* evd = d->FindValueByName(name) ;
if( !evd ){
/* or maybe it should just be NA */
- Rcpp::throw("cannot get the value");
+ Rcpp::stop("cannot get the value");
}
return evd->number();
}
Modified: pkg/src/wrapper_FieldDescriptor.cpp
===================================================================
--- pkg/src/wrapper_FieldDescriptor.cpp 2013-12-27 20:04:29 UTC (rev 608)
+++ pkg/src/wrapper_FieldDescriptor.cpp 2013-12-27 21:10:36 UTC (rev 609)
@@ -83,7 +83,7 @@
RPB_FUNCTION_1(S4_EnumDescriptor, METHOD(enum_type), Rcpp::XPtr<GPB::FieldDescriptor> d){
if( d->cpp_type() != CPPTYPE_ENUM ){
- Rcpp::throw("not an enum type field");
+ Rcpp::stop("not an enum type field");
}
return S4_EnumDescriptor( d->enum_type() ) ;
}
Modified: pkg/src/wrapper_Message.cpp
===================================================================
--- pkg/src/wrapper_Message.cpp 2013-12-27 20:04:29 UTC (rev 608)
+++ pkg/src/wrapper_Message.cpp 2013-12-27 21:10:36 UTC (rev 609)
@@ -737,7 +737,7 @@
}
default:
{
- Rcpp::throw("Cannot convert to int32");
+ Rcpp::stop("Cannot convert to int32");
}
}
break ;
@@ -758,7 +758,7 @@
ref->AddInt64( message, field_desc, GET_int64(values,i) ) ;
}
default:
- Rcpp::throw("Cannot convert to int64");
+ Rcpp::stop("Cannot convert to int64");
}
break ;
}
@@ -780,7 +780,7 @@
break ;
}
default:
- Rcpp::throw("Cannot convert to uint32");
+ Rcpp::stop("Cannot convert to uint32");
}
break ;
}
@@ -802,7 +802,7 @@
break ;
}
default:
- Rcpp::throw("Cannot convert to int64");
+ Rcpp::stop("Cannot convert to int64");
}
break ;
}
@@ -823,7 +823,7 @@
break ;
}
default:
- Rcpp::throw("Cannot convert to double");
+ Rcpp::stop("Cannot convert to double");
}
break ;
}
@@ -844,7 +844,7 @@
break ;
}
default:
- Rcpp::throw("Cannot convert to float");
+ Rcpp::stop("Cannot convert to float");
}
break ;
}
@@ -865,7 +865,7 @@
break ;
}
default:
- Rcpp::throw("Cannot convert to bool");
+ Rcpp::stop("Cannot convert to bool");
}
break ;
}
@@ -879,7 +879,7 @@
ref->AddString( message, field_desc, COPYSTRING( CHAR(STRING_ELT(values,i )) ) ) ;
}
} else{
- Rcpp::throw("Cannot convert to string");
+ Rcpp::stop("Cannot convert to string");
}
break ;
}
@@ -895,7 +895,7 @@
ref->AddString( message, field_desc, GET_bytes(values,i )) ;
}
} else{
- Rcpp::throw("Cannot convert to bytes");
+ Rcpp::stop("Cannot convert to bytes");
}
break ;
}
@@ -914,7 +914,7 @@
ref->AddMessage(message, field_desc)->CopyFrom( *mess ) ;
}
} else{
- Rcpp::throw("type mismatch, expecting a list of 'Message' objects");
+ Rcpp::stop("type mismatch, expecting a list of 'Message' objects");
}
break ;
}
@@ -954,7 +954,7 @@
// {{{ default
default:
{
- Rcpp::throw("cannot set enum value");
+ Rcpp::stop("cannot set enum value");
}
// }}}
}
@@ -967,7 +967,7 @@
}
}
} else{
- Rcpp::throw("add can only be used on repeated fields");
+ Rcpp::stop("add can only be used on repeated fields");
}
}
Modified: pkg/src/wrapper_ServiceDescriptor.cpp
===================================================================
--- pkg/src/wrapper_ServiceDescriptor.cpp 2013-12-27 20:04:29 UTC (rev 608)
+++ pkg/src/wrapper_ServiceDescriptor.cpp 2013-12-27 21:10:36 UTC (rev 609)
@@ -99,7 +99,7 @@
}
if( !method_desc ){
- Rcpp::throw("could not get MethodDescriptor");
+ Rcpp::stop("could not get MethodDescriptor");
}
return S4_MethodDescriptor( method_desc );
More information about the Rprotobuf-commits
mailing list