Browse Source

ob-eval: no longer throws errors on non-numeric exit codes

* lisp/ob-eval.el (org-babel-eval-error-notify): no longer throws
  errors on non-numeric exit codes
Eric Schulte 10 years ago
parent
commit
39f71206c5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lisp/ob-eval.el

+ 2 - 2
lisp/ob-eval.el

@@ -38,7 +38,7 @@
       (goto-char (point-max))
       (save-excursion (insert stderr)))
     (display-buffer buf))
-  (message "Babel evaluation exited with code %d" exit-code))
+  (message "Babel evaluation exited with code %S" exit-code))
 
 (defun org-babel-eval (cmd body)
   "Run CMD on BODY.
@@ -51,7 +51,7 @@ STDERR with `org-babel-eval-error-notify'."
       (setq exit-code
 	    (org-babel-shell-command-on-region
 	     (point-min) (point-max) cmd t 'replace err-buff))
-      (if (> exit-code 0)
+      (if (or (not (numberp exit-code)) (> exit-code 0))
 	  (progn
 	    (with-current-buffer err-buff
 	      (org-babel-eval-error-notify exit-code (buffer-string)))