senseyeio / roger

Golang RServe client. Use R from Go
MIT License
272 stars 34 forks source link

Added public GetError method to the packet. #39

Closed cesarsalgado closed 6 years ago

cesarsalgado commented 6 years ago

Before the only way for the user to get the error was to call GetResultObject. However, the parse would also be called in this case and then the user wouldn't know (programatically) where the error came from. Off course, the librarie's user could make some string matching to try to deduce, but this is error prone and non scalable.

dareid commented 6 years ago

Thanks for the change @cesarsalgado, it looks like a good addition. Any chance of a test for it?

cesarsalgado commented 6 years ago

Hi @dareid , I added two tests to packet_test.go. Let me know if they are enough. Thanks

dareid commented 6 years ago

Perfect, thanks for the PR @cesarsalgado