fastr
fastr copied to clipboard
Error Message bei Syntax Error
Lexer/Parser does not give as much information as GNU-R. For example GNU-R:
> parseCode <- function(code) tryCatch(parse(text=code), error=function(x) return(x));
> .r.code <- "mean(c(1, 2, %3))"
> parseCode(.r.code)
<simpleError in parse(text = code): <text>:1:14: unexpected input
1: mean(c(1, 2, %3))
^>
>
Same code by FastR:
> parseCode <- function(code) tryCatch(parse(text=code), error=function(x) return(x));
> .r.code <- "mean(c(1, 2, %3))"
> parseCode(.r.code)
<simpleError in parse(text = code): parse error>
>
FastR does not report line of error. R-User might not expected exactly the same error message as GNU-R, but more information is better, at least where error happens.