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

NewRecord panics when receiving an invalid schema instead of returning error #45

Closed
rweics opened this issue Mar 5, 2016 · 2 comments
Closed
Assignees

Comments

@rweics
Copy link

rweics commented Mar 5, 2016

goroutine 6 [running]:
panic(0x476820, 0xc82000a0f0)
    /usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
testing.tRunner.func1(0xc82019c870)
    /usr/local/Cellar/go/1.6/libexec/src/testing/testing.go:467 +0x192
panic(0x476820, 0xc82000a0f0)
    /usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:426 +0x4e9
github.com/linkedin/goavro.NewRecord(0xc8200519f8, 0x1, 0x1, 0xc8203a79e0, 0x0, 0x0)
    $GOPATH/src/github.com/linkedin/goavro/record.go:148 +0x11a
@karrick
Copy link
Contributor

karrick commented Apr 14, 2016

Are you legally able to share a copy of that schema so I can see what's going on? I understand if you're not able to because of work restrictions...

If not, could you paste more of the panic in this issue, so I can try to troubleshoot?

@karrick karrick self-assigned this Apr 14, 2016
@karrick
Copy link
Contributor

karrick commented Jun 1, 2017

The newer version of this library no longer uses NewRecord to create record instances, but rather uses simple Go maps. Send a Go map instance with keys that match the record's fields to the encoder and it will return an encoded record. Decoding a record will return a Go map with keys that match the record fields.

https://github.com/karrick/goavro

@karrick karrick closed this as completed Jun 1, 2017
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

2 participants