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 reporting with subsequent viz.js calls #46

Closed
mstefaniuk opened this issue Oct 16, 2015 · 1 comment
Closed

Error reporting with subsequent viz.js calls #46

mstefaniuk opened this issue Oct 16, 2015 · 1 comment
Labels

Comments

@mstefaniuk
Copy link

When calling Viz() only first time error line matches original input. Next calls return errors on incrementing lines. Some errors are reported only first few calls. Example of this behavior can be viewed on fiddle.

Also reporting on console is little bit inconvenient but it is another issue.

@mdaines
Copy link
Owner

mdaines commented Oct 19, 2015

That's pretty odd. I'll have a look.

Proper error reporting is next on my list.

mdaines added a commit that referenced this issue Oct 22, 2015
mdaines added a commit that referenced this issue Oct 23, 2015
…ors. Addresses #46.

Given input like "digraph {} ->", Graphviz seems to think we have two graphs: one empty graph and one with a syntax error. Indeed, the input "digraph A {} digraph B {}" will produce two valid output graphs with the dot command-line tool. The problem is that when called multiple times for different input, agmemread() appears to return output for successive graphs in the initial input.

- Return output from the first graph in the input (if there is one), and throw an exception if any of the input graphs contain a syntax error.
- Call agmemread() until there are no more graphs, setting its input to the empty string after the first call.
@mdaines mdaines closed this as completed Oct 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants