astahlman / ob-async

Asynchronous src_block execution for org-babel
343 stars 32 forks source link

Handle errors of code blocks and return them to the user #86

Open KaiHa opened 2 years ago

KaiHa commented 2 years ago

During the execution of code-blocks some errors could go unnoticed. This PR adds code that will return an error description to the user. With this the following code blocks should return error messages instead of silently failing:

#+BEGIN_SRC emacs-lisp :async
(error "somewhere an error was signaled")
#+END_SRC
#+begin_src sh :results output :async
echo something went wrong >&2
false
#+end_src
#+begin_src python :async
raise NotImplementedError
#+end_src

See the individual commits for details.

And thanks for this awesome package.

KaiHa commented 2 years ago

This should also fix #81.

chasecaleb commented 2 years ago

I would love to see this merged!