int dataSize = getTypeSize("char");
paramLen = (*(vector<char>*) paramObj).size() * dataSize;
} else {
- string error = "IoTRMICall: Unrecognizable type: " + type;
- throw error;
+ cerr << "IoTRMIUtil: Unrecognizable type: " << type;
+ exit(-1);
}
return paramLen;
// This is an array type, i.e. vector
retObj = getArrayParamObject(retObj, type, paramBytes, len);
} else {
- string error = "IoTRMIUtil: Unrecognizable type: " + string(type);
- throw error;
+ cerr << "IoTRMIUtil: Unrecognizable type: " << type;
+ exit(-1);
}
return retObj;
} else if (strcmp(type, "String[]") == 0) {
retObj = byteArrayToStringArray((vector<string>*) retObj, paramBytes, len);
} else {
- string error = "IoTRMIUtil: Unrecognizable type: " + string(type);
- throw error;
+ cerr << "IoTRMIUtil: Unrecognizable type: " << type;
+ exit(-1);
}
return retObj;
// This is an array type, i.e. vector
retObjBytes = getArrayObjectBytes(retObjBytes, obj, type);
} else {
- string error = "IoTRMIUtil: Unrecognizable type: " + string(type);
- throw error;
+ cerr << "IoTRMIUtil: Unrecognizable type: " << type;
+ exit(-1);
}
return retObjBytes;
} else if (strcmp(type, "String[]") == 0) {
retObjBytes = arrStringToByteArray(*((vector<string>*) obj), retObjBytes);
} else {
- string error = "IoTRMIUtil: Unrecognizable type: " + string(type);
- throw error;
+ cerr << "IoTRMIUtil: Unrecognizable type: " << type;
+ exit(-1);
}
return retObjBytes;