rgbkrk / libvirt-go

[DEPRECATED] Go bindings for libvirt
https://github.com/libvirt/libvirt-go
MIT License
166 stars 50 forks source link

Mapping for errors #32

Closed cbosdo closed 10 years ago

cbosdo commented 10 years ago

Note: this commit changes libvirt.GetLastError() return value. I'm not sure if it's OK to break API compatibility. Otherwise, we could try to find another name for it.

Changed GetLastError to return VirError instead of a simple string. VirError helps getting easy access to the error code, level and domain. VirError implements the error interface for easy use.

cbosdo commented 10 years ago

Withdrawing for the while... still errors

alexzorin commented 10 years ago

fwiw as long as the String() output is the same, I think this is OK as far as backwards compatibility goes