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

Error handling utility / Generate debugging information #14

Open
prettydiff opened this issue Nov 12, 2017 · 6 comments
Open

Error handling utility / Generate debugging information #14

prettydiff opened this issue Nov 12, 2017 · 6 comments

Comments

@prettydiff
Copy link

Perhaps there should be a utility to provide error handling. This utility can accept a title, message, and stack trace and format that information properly to the executing environment whether HTML, CLI, or one of the various IDEs.

@Glavin001
Copy link
Member

Atom-Beautify generated a Markdown file for debug information: https://github.com/Glavin001/atom-beautify/blob/master/src/beautify.coffee#L288-L509

With Unibeautify, I would like to build debugging into the core, and export as JSON.
Then the JSON can be read by https://github.com/Unibeautify/assistant and the user has an interact assistant to help them resolve their issue.

@prettydiff
Copy link
Author

For the moment I am using a micro-utility to provide support for this: https://github.com/Unibeautify/parse-framework/blob/master/services.ts#L187-L205

But I could probably spin this out to be an external utility that accepts a callback.

@Glavin001
Copy link
Member

No need. Unibeautify is going to need fairly unique debugging information being returned, such as the intermediate results from multiple beautifiers in series (see #4 ) and more.

I may start working on this task soon since debugging is very important.

@Glavin001 Glavin001 self-assigned this Feb 14, 2018
@stevenzeck stevenzeck changed the title Error handling utility Error handling utility / Generate debugging information Mar 14, 2018
@stevenzeck
Copy link
Contributor

  • Editors will need to provide some info: Version information such as atom, apm, electron, npm, etc.
  • Stack traces, would they come from editors or Unibeautify core? Or both?
  • JSON output would be inserted into https://assistant.unibeautify.com/#/debug. Maybe see if we can launch the user's browser to that page upon a debug request with the JSON already there?
  • For Atom specifically, I'm watching https://github.com/atom/town-crier to see if any services are ever implemented. Would be nice to auto-generate an issue based off of a nice form

@Glavin001
Copy link
Member

Town Crier looks beautiful.

The checklist you have above is great! I have been thinking we should also report the version of package dependencies, too, such as prettier and js-beautify, etc. And also intermediate steps, such as when beautifiers: ["Prettier", "JS-Beautify"] is configured, it beautifies twice and could be problems with either. I would also like the Assistant to guide the user to determine which beautifier, if any, was the culprit and then report to those instead of the Unibeautify core.

@stevenzeck
Copy link
Contributor

Right, Unibeautify core would just be responsible for gathering the information and generating the JSON. Assistant would read it and guide users through the issue.

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

No branches or pull requests

3 participants