print(ERRVL(1,2,3)) # 1
print(ERRVL(try(solve(0)),2,3)) # 2
print(ERRVL(1, stop("Error!"))) # No error
if (FALSE) {
# Error:
print(ERRVL(try(solve(0), silent=TRUE),
stop("Error!")))
# Error with an elaborate message:
print(ERRVL(try(solve(0), silent=TRUE),
stop("Stopped with an error: ", .)))
}
Run the code above in your browser using DataLab