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

Uncaught PHP exceptions in do_blocks() #1647

Closed
ocean90 opened this issue Jul 2, 2017 · 6 comments
Closed

Uncaught PHP exceptions in do_blocks() #1647

ocean90 opened this issue Jul 2, 2017 · 6 comments

Comments

@ocean90
Copy link
Member

ocean90 commented Jul 2, 2017

Gutenberg_PEG_Parser::parse() can throw an exception which is not caught by an error handler in do_blocks() leading to a fatal error.

@nylen
Copy link
Member

nylen commented Jul 2, 2017

Which exception is this? With what content does it occur?

@swissspidy
Copy link
Member

There's a throw new Exception("Can't start parsing from rule \"" + $options["startRule"] + "\"."); line in that method.

@ocean90
Copy link
Member Author

ocean90 commented Jul 3, 2017

Right, there's also throw $this->peg_buildException(), a wrapper for Gutenberg_PEG_SyntaxError.

@nylen
Copy link
Member

nylen commented Jul 3, 2017

Neither of these are reachable in our setup. Feel free to reopen this if there is a unit-testable case here but I am pretty sure there isn't.

@nylen nylen closed this as completed Jul 3, 2017
@ocean90
Copy link
Member Author

ocean90 commented Jul 3, 2017

Looks like the current parser isn't the best solution anyway so I'm fine with closing.

@nylen
Copy link
Member

nylen commented Jul 3, 2017

That's a separate discussion. I closed this because I don't think it's a practical problem. If that's not right, please let me know and we'll fix it.

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

3 participants