Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaling an erroring form into a comment #2718

Closed
RickMoynihan opened this issue Sep 27, 2019 · 0 comments
Closed

Evaling an erroring form into a comment #2718

RickMoynihan opened this issue Sep 27, 2019 · 0 comments
Labels
bug good first issue A simple tasks suitable for first-time contributors

Comments

@RickMoynihan
Copy link
Contributor

Evaling the form (throw (ex-info "foo" {})) with M-x cider-pprint-eval-last-sexp-to-comment yields the empty comment string:

;; =>

Arguably it should either:

  1. Not yield a ;; => at all (just the empty string) (and appropriate cider error buffer)

or it should:

  1. Print the error in the comment.

The later might be useful when describing code interactions and REPL sessions; though I think the former might be a more sensible default for normal usage.

@bbatsov bbatsov added bug good first issue A simple tasks suitable for first-time contributors labels Sep 27, 2019
cursande added a commit to cursande/cider that referenced this issue Jun 29, 2020
If an error is returned when pprint-eval-last-sexp-to-comment is called,
the result string will be empty. While it may ocassionally make sense to
print out the exception, typically people will only want the successful
evaluation, without having to clean up the empty comment string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue A simple tasks suitable for first-time contributors
Projects
None yet
Development

No branches or pull requests

2 participants