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

Don't panic on error. #4

Merged
merged 1 commit into from
Dec 14, 2015
Merged

Don't panic on error. #4

merged 1 commit into from
Dec 14, 2015

Conversation

omeid
Copy link
Contributor

@omeid omeid commented Dec 14, 2015

If there is an early parse error before a Root node is created. The Parse function panics.

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x6caa24]

goroutine 71 [running]:
github.com/Joker/jade.(*tree).String(0x0, 0x0, 0x0)
    /home/GO/go/src/github.com/Joker/jade/template.go:41 +0x24
github.com/Joker/jade.Parse(0xc820214250, 0xb, 0xc820618000, 0x54a, 0x0, 0x0, 0x0, 0x0)
    /home/GO/go/src/github.com/Joker/jade/template.go:37 +0x196
......

Joker added a commit that referenced this pull request Dec 14, 2015
Don't panic on error.
@Joker Joker merged commit 2337221 into Joker:master Dec 14, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants