Upgrading iodine

This commit is contained in:
Frederick F. Kautz IV 2015-03-25 17:32:25 -07:00
parent 28355c7aa6
commit 9b9d5e9d39
2 changed files with 12 additions and 9 deletions

2
Godeps/Godeps.json generated
View File

@ -20,7 +20,7 @@
}, },
{ {
"ImportPath": "github.com/minio-io/iodine", "ImportPath": "github.com/minio-io/iodine",
"Rev": "f92ca01c8671d9565c7aa58e3427364c5e187ccf" "Rev": "2843626767a878d03d02acd4d2bc3790eb325b64"
}, },
{ {
"ImportPath": "gopkg.in/check.v1", "ImportPath": "gopkg.in/check.v1",

View File

@ -91,15 +91,18 @@ func GetGlobalStateKey(k string) string {
// New - instantiate an error, turning it into an iodine error. // New - instantiate an error, turning it into an iodine error.
// Adds an initial stack trace. // Adds an initial stack trace.
func New(err error, data map[string]string) *Error { func New(err error, data map[string]string) *Error {
entry := createStackEntry() if err != nil {
for k, v := range data { entry := createStackEntry()
entry.Data[k] = v for k, v := range data {
} entry.Data[k] = v
return &Error{ }
EmbeddedError: err, return &Error{
ErrorMessage: err.Error(), EmbeddedError: err,
Stack: []StackEntry{entry}, ErrorMessage: err.Error(),
Stack: []StackEntry{entry},
}
} }
return nil
} }
// createStackEntry - create stack entries // createStackEntry - create stack entries