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

renderer: Helpful panic for unknown NodeKind #110

Closed
wants to merge 1 commit into from
Closed

renderer: Helpful panic for unknown NodeKind #110

wants to merge 1 commit into from

Commits on Mar 7, 2020

  1. renderer: Helpful panic for unknown NodeKind

    When rendering a Node, Renderer looks up the NodeRenderer for that
    node's kind in a slice. That will panic with an "index out of range"
    error if a node renderer for that node kind has not been registered.
    
        panic: runtime error: index out of range [1] with length 1
    
    This changes Renderer to panic with a more helpful error message if the
    node kind is unrecognized.
    
        panic: unrecognized node kind Document cannot be rendered:
        register a renderer for this node kind first
    abhinav committed Mar 7, 2020
    Configuration menu
    Copy the full SHA
    120b8c7 View commit details
    Browse the repository at this point in the history