aboutsummaryrefslogtreecommitdiffstats
path: root/core/errors.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2015-11-07 23:15:11 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2015-11-07 23:15:11 +0100
commitb7cf99f3e80e482e743448fb633612cd02090a7c (patch)
tree378f42bdade6b004bca79295d2fe5989b0cda7bb /core/errors.go
parent8a305e98171cbb70e58e67c9c939eb768b886510 (diff)
downloadgo-git-b7cf99f3e80e482e743448fb633612cd02090a7c.tar.gz
core: erros making public the inner error
Diffstat (limited to 'core/errors.go')
-rw-r--r--core/errors.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/errors.go b/core/errors.go
index fd1133e..50772b6 100644
--- a/core/errors.go
+++ b/core/errors.go
@@ -3,7 +3,7 @@ package core
import "fmt"
type PermanentError struct {
- err error
+ Err error
}
func NewPermanentError(err error) *PermanentError {
@@ -11,15 +11,15 @@ func NewPermanentError(err error) *PermanentError {
return nil
}
- return &PermanentError{err: err}
+ return &PermanentError{Err: err}
}
func (e *PermanentError) Error() string {
- return fmt.Sprintf("permanent client error: %s", e.err.Error())
+ return fmt.Sprintf("permanent client error: %s", e.Err.Error())
}
type UnexpectedError struct {
- err error
+ Err error
}
func NewUnexpectedError(err error) *UnexpectedError {
@@ -27,9 +27,9 @@ func NewUnexpectedError(err error) *UnexpectedError {
return nil
}
- return &UnexpectedError{err: err}
+ return &UnexpectedError{Err: err}
}
func (e *UnexpectedError) Error() string {
- return fmt.Sprintf("unexpected client error: %s", e.err.Error())
+ return fmt.Sprintf("unexpected client error: %s", e.Err.Error())
}