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

Pretty Printing Exceptions in cider-test #1873

Closed
rymndhng opened this issue Oct 21, 2016 · 7 comments
Closed

Pretty Printing Exceptions in cider-test #1873

rymndhng opened this issue Oct 21, 2016 · 7 comments
Labels
enhancement good first issue A simple tasks suitable for first-time contributors

Comments

@rymndhng
Copy link
Contributor

When I'm working with cider-test and a test throws a ex-info with a large data structure (i.e. working with prismatic.schema), it's always printed in a single line (regardless if I have pretty-printing enabled or disabled).

If we had the ability to pretty-print these objects, it would make inspecting large objects easier.

@bbatsov
Copy link
Member

bbatsov commented Oct 24, 2016

Is your issue similar to #1707 ?

I'm not sure what exactly are you suggesting that we should pretty-print.

@rymndhng
Copy link
Contributor Author

@bbatsov Similar error, (in fact I am using schema as well).

I'm wondering if it's possible to take that exception object and pretty print it because the map object is quite big.

screen shot 2016-10-25 at 10 10 28 pm

@bbatsov
Copy link
Member

bbatsov commented Oct 26, 2016

The problem is that this is just plain text in the exception message and here's no way to know what's a Clojure object there and what is not...

@xiongtx
Copy link
Member

xiongtx commented Oct 26, 2016

Is there a way to tell whether the exception is an ExceptionInfo object? If so, we know that it's a message followed by a map.

Clojure itself tends to be pretty consistent in using ex-info to raise exceptions.

@bbatsov
Copy link
Member

bbatsov commented Oct 26, 2016

Perhaps, I don't have any time to research this. If someone else would like to tackle it - be my guest. :-)

@stale
Copy link

stale bot commented May 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

@stale stale bot added the stale label May 8, 2019
@bbatsov bbatsov added the good first issue A simple tasks suitable for first-time contributors label May 14, 2019
@stale stale bot removed the stale label May 14, 2019
@vemv
Copy link
Member

vemv commented Aug 24, 2023

These days, ex-data is printed nicely:

image

@vemv vemv closed this as completed Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue A simple tasks suitable for first-time contributors
Projects
None yet
Development

No branches or pull requests

4 participants