Prechádzať zdrojové kódy

lisp/ob-R.el: Don't throw an error when result cannot be parsed

* lisp/ob-R.el (org-babel-R-process-value-result): When the result
cannot be parsed, return an error as the output.

Thanks to Greg Minshall for reporting this.
Bastien 5 rokov pred
rodič
commit
d9fe6aeafe
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  1. 3 1
      lisp/ob-R.el

+ 3 - 1
lisp/ob-R.el

@@ -460,7 +460,9 @@ last statement in BODY, as elisp."
   "R-specific processing of return value.
 Insert hline if column names in output have been requested."
   (if column-names-p
-      (cons (car result) (cons 'hline (cdr result)))
+      (condition-case nil
+	  (cons (car result) (cons 'hline (cdr result)))
+	(error "Could not parse R result"))
     result))
 
 (provide 'ob-R)