Skip to content
Snippets Groups Projects
Commit e01a1813 authored by stepan's avatar stepan
Browse files

Allow empty message in .signalCondition

parent 4b4339f2
No related branches found
No related tags found
No related merge requests found
......@@ -177,8 +177,15 @@ public class ConditionFunctions {
}
@Specialization
protected RNull signalCondition(RList condition, RAbstractStringVector msg, Object call) {
RErrorHandling.signalCondition(condition, msg.getDataAt(0), call);
protected RNull signalCondition(RList condition, Object msg, Object call) {
String msgStr = "";
if (msg instanceof RAbstractStringVector) {
RAbstractStringVector msgVec = (RAbstractStringVector) msg;
if (msgVec.getLength() > 0) {
msgStr = ((RAbstractStringVector) msg).getDataAt(0);
}
}
RErrorHandling.signalCondition(condition, msgStr, call);
return RNull.instance;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment