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

Stacktrace and exception information #252

Closed
barrystaes opened this issue Jan 14, 2015 · 5 comments
Closed

Stacktrace and exception information #252

barrystaes opened this issue Jan 14, 2015 · 5 comments

Comments

@barrystaes
Copy link

I was looking into the Whoops online demo, and i guess i dont understand it. There is all sorts of basic request and environment information but no clear:

  • Exception information (type and message)
  • Stack trace (i only see a code snippet)

And perhaps a feature request:
Also i'd expect this to allow custom log lists, not everything is a fatal exception.
For example i'd like to log unexpected values (bug nominations) and other assertions, certain state changes, or specific non-critical info.

@denis-sokolov
Copy link
Collaborator

Unfortunate wording of the demo. Oh no! is the exception message, RuntimeException above is the exception type. The entire left column is the stack trace that you can click on to see snippets from that frame.

To log whatever you want, feel free to use a logging library, such as monolog.

@barrystaes
Copy link
Author

Whoops that explains.. this certainly is not self-evident.

Perhaps this can be improved:

  • change wording in the example (i for example am used to exceptions with names either having an E* prefix, or *Exception suffix)
  • have the UI stacktrace single-line readable (and resizable) or even better use the full width (with expandable items or details pane below)
  • move the UI exception type (it should not be inside the details pane on the right)

I am willing to implement this and pull request it, if the maintainers appreciate that.

PS. Also, i wonder, can it show only the one fatal exception? What if multiple exceptions where catched?

@denis-sokolov
Copy link
Collaborator

Perhaps this can be improved:
[ui changes]

Unforunately, the project does not have manpower for important feature requests and some bugs, thus the ui improvements will certainly not happen unless somebody offers help.

move the UI exception type (it should not be inside the details pane on the right)

I am confused as to why it should not be in the details pane.
It's next to the exception message.

Also, i wonder, can it show only the one fatal exception?

I don't know what "fatal exception" means. But yes, the GUI of Whoops can only display one exception.
Note that since #132 if the exception is wrapped around another exception, we will show the full stack trace from the wrapped exception.

What if multiple exceptions where catched?

If you catch multiple exceptions, then you have them in your variables. I'm not sure what you expect Whoops to do about it.

@barrystaes
Copy link
Author

Thanks for your response.

I am confused as to why it should not be in the details pane.

Ok i'll explain my thoughts. So the stacktrace regards one exception. The details pane shows one item from the stacktrace. To me, showing the exception inside a details pane makes no sense. Its not as if it can differ per stacktrace item, or am i mistaken?

The fact that its shown there (multiple times) strongly implies that it can differ per selected item on the left. It does scroll the exception out of view, which i took as some bug. That exception type is the sole main subject, so why hide it?

If you catch multiple exceptions, then you have them in your variables. I'm not sure what you expect Whoops to do about it.

It depends on how you use exceptions ofcourse.
I like to allow graceful degradation (damage control) so these are handled (minimally and so that the main process can avoid going nuclear by dropping an important ball) and aught to be logged somewhere. I might have optional parts for example, that when missing (not assigned) raise an exception but dont have to ruin the request as a whole. Still, i'd like to log these in detail.

@denis-sokolov
Copy link
Collaborator

The fact that its shown there (multiple times) strongly implies that it can differ per selected item on the left. It does scroll the exception out of view, which i took as some bug. That exception type is the sole main subject, so why hide it?

When you put this way, I get it now. Yes, in that regard I agree, I found this part of the UI confusing from the beginning. By now I've seen it so much that I got used to it, but, yes, if I could, I'd move the exception message and type on the top spanning the entire page, and then the stack and frame details below it.
I agree.

Still, i'd like to log these in detail.

Well, awesome, use Monolog! How is this related to Whoops? The entire purpose of Whoops is to handle uncaught exceptions and provide a GUI to display a single exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants