private void RunRCodeNoOutputAsync(string script) { try { // rserve faq: https://www.rforge.net/Rserve/faq.html _rconnection.VoidEvalAsync(script).Wait(); } catch (Exception myException) { var error = _rconnection.EvalAsync("geterrmessage()").Result; var message = myException.Message; throw; } }