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

[feature request] better error messages #528

Open
FractalHQ opened this issue Mar 25, 2023 · 0 comments
Open

[feature request] better error messages #528

FractalHQ opened this issue Mar 25, 2023 · 0 comments

Comments

@FractalHQ
Copy link

Hey! I've noticed that the TpError message can often be difficult to work with, and often doesn't tell me which input is causing the error which makes debugging more difficult.

A few ways I think it could be improved:

  1. Printing the object causing the error to the console. A console.error({ controller }) would go very far. If not that, then even the name or any other identifying information would help a lot.

  2. Dumping the stack in its own log so it's easier to work with.

Not sure how it would look exactly, but something like:

console.error({ controller }) // 1.
console.error(TpError.stack) // 2.
throw new Error(TpError)

As it is now, it can be cumbersome to navigate the stack trace as a string in devtools, and things like links obviously don't work. It would be nice to have the objects in the console instead of stringified versions from TpError:

ezgif com-optimize

These are just some ideas -- what do you think? I'd be happy to make a PR if you like any of them!

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

1 participant