diff options
| author | Jesper Hansen <[email protected]> | 2013-07-07 16:43:44 +0200 |
|---|---|---|
| committer | Carlos MartÃn Nieto <[email protected]> | 2014-02-26 16:10:00 +0100 |
| commit | 499f52a3549503604f30663211361e2fbd3cf202 (patch) | |
| tree | ef2008e677ad5eae7f9443bb0d150b85673cb01b /config.go | |
| parent | 3e5586bd8d532c929aecf778fc094e4f86588d37 (diff) | |
Added git error code to the error object.
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -94,7 +94,7 @@ func (c *Config) LookupInt32(name string) (int32, error) { ret := C.git_config_get_int32(&out, c.ptr, cname) if ret < 0 { - return 0, LastError() + return 0, MakeGitError(ret) } return int32(out), nil @@ -110,7 +110,7 @@ func (c *Config) LookupInt64(name string) (int64, error) { ret := C.git_config_get_int64(&out, c.ptr, cname) if ret < 0 { - return 0, LastError() + return 0, MakeGitError(ret) } return int64(out), nil @@ -125,7 +125,7 @@ func (c *Config) LookupString(name string) (string, error) { defer runtime.UnlockOSThread() if ret := C.git_config_get_string(&ptr, c.ptr, cname); ret < 0 { - return "", LastError() + return "", MakeGitError(ret) } return C.GoString(ptr), nil @@ -220,7 +220,7 @@ func (c *Config) SetString(name, value string) (err error) { ret := C.git_config_set_string(c.ptr, cname, cvalue) if ret < 0 { - return LastError() + return MakeGitError(ret) } return nil |
