Skip to content
Snippets Groups Projects
Commit b74509bd authored by Mick Jordan's avatar Mick Jordan
Browse files

add wrong argument type error

parent 0a0d3567
Branches
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@ public abstract class RError extends RuntimeException {
public static final String INVALID_TIMES = "invalid 'times' argument";
public static final String INVALID_TFB = "invalid (to - from)/by in seq(.)";
public static final String WRONG_SIGN_IN_BY = "wrong sign in 'by' argument";
public static final String WRONG_TYPE = "wrong type of argument";
public static final String BY_TOO_SMALL = "'by' argument is much too small";
public static final String INCORRECT_SUBSCRIPTS = "incorrect number of subscripts";
public static final String INCORRECT_SUBSCRIPTS_MATRIX = "incorrect number of subscripts on a matrix";
......@@ -495,6 +496,18 @@ public abstract class RError extends RuntimeException {
};
}
public static RError getWrongTypeOfArgument(SourceSection expr) {
return new RErrorInExpr(expr) {
private static final long serialVersionUID = 1L;
@Override
public String getMessage() {
return RError.WRONG_TYPE;
}
};
}
public static RError getByTooSmall(SourceSection expr) {
return new RErrorInExpr(expr) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment