Graphic: Catch errors and return error message
commiteaa3a761dae7686c6f3cb67092933b5e79c5ff87
authorRainer M. Krug <R.M.Krug@gmail.com>
Tue, 21 Jan 2014 09:35:52 +0000 (21 10:35 +0100)
committerEric Schulte <schulte.eric@gmail.com>
Sun, 26 Jan 2014 18:05:46 +0000 (26 11:05 -0700)
treed963c7903e2a2c48d6fe732ef245e718c19db9b6
parente0d14e6aa7675e1a37125cea8a68b2119aa40d7d
Graphic: Catch errors and return error message

* lisp/ob-R.el (org-babel-expand-body:R): Added the opening of the
  tryCatch() wrapper

* lisp/ob-R.el (org-babel-R-construct-graphics-device-call): Added
  closing of the wrapper containing the error function.

Added tryCatch() wrapper around the execution of the source block so
that if an error occurs
- the R graphic device is closed even when an error occurs
- a graph containing the error message is created
- the error message is printed in the R session in the form
    ERROR : the error message

TINYCHANGE
lisp/ob-R.el