Related question on SO: https://stackoverflow.com/questions/66603676/capture-error-messages-as-character-string-in-r/66660202 See also https://github.com/r-lib/evaluate/issues/101 Would it be possible to capture exact "console error": ``` 5 5 #> Error: unexpected numeric constant in "5 5" message(paste("Error:", pander::evals("5 5")[[1]]$msg$errors)) #> Error: Unexpected numeric constant at character 3 in line 1: ` 5 5` ``` Thank you,