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

More descriptive stratify errors. #41

Closed
syntagmatic opened this issue May 14, 2016 · 5 comments
Closed

More descriptive stratify errors. #41

syntagmatic opened this issue May 14, 2016 · 5 comments

Comments

@syntagmatic
Copy link

syntagmatic commented May 14, 2016

This would be especially helpful to people using d3-stratify for the first time, such as forking an example like Tidy Tree and trying to input their own data.

Some ideas about what the text might be.

  • d3-stratify: cannot accept multiple root nodes
  • d3-stratify: requires a root node to create a valid hierarchy
  • d3-stratify: this parent id is missing from the hierarchy: nodeId
  • d3-stratify: ambiguous reference: nodeId matches two parents

image

@mbostock mbostock changed the title More descriptive d3-stratify errors More descriptive stratify errors. May 14, 2016
@mbostock
Copy link
Member

d3-stratify already outputs descriptive errors:

  • "multiple roots"
  • "missing: " + nodeId
  • "ambiguous: " + nodeId
  • "no root"
  • "cycle"

I think that plus the stack trace and documentation should be sufficient.

@tylergraf
Copy link

I couldn't figure out what ambiguous meant. Thanks @syntagmatic, this really helped my debugging.

@joar
Copy link

joar commented Sep 27, 2016

@mbostock Except when you're running with minified D3. I just had this issue, with "missing:".

I thought it was the CSV parsing before I found this Issue. At least a d3-stratify: missing: $foo would be nice, in the minified case.

@herebebeasties
Copy link

It would be really, really nice if it told you what was causing the cycle, though - Error("cycle") isn't very helpful when you have 1000 nodes in your "tree".

@schindld
Copy link

It would be really, really nice if it told you what was causing the cycle, though - Error("cycle") isn't very helpful when you have 1000 nodes in your "tree".

I'm stuck on the Error: cycle error right now with a dataset of 27811 nodes...Such a useless error message. At least output the relevant nodes' ids.

@d3 d3 locked and limited conversation to collaborators May 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

6 participants