From 9b9d5e9d39f4f4c78e731bfdd13ea5bb54009b5d Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Wed, 25 Mar 2015 17:32:25 -0700 Subject: [PATCH] Upgrading iodine --- Godeps/Godeps.json | 2 +- .../src/github.com/minio-io/iodine/iodine.go | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index e2dbe7604..169efd540 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -20,7 +20,7 @@ }, { "ImportPath": "github.com/minio-io/iodine", - "Rev": "f92ca01c8671d9565c7aa58e3427364c5e187ccf" + "Rev": "2843626767a878d03d02acd4d2bc3790eb325b64" }, { "ImportPath": "gopkg.in/check.v1", diff --git a/Godeps/_workspace/src/github.com/minio-io/iodine/iodine.go b/Godeps/_workspace/src/github.com/minio-io/iodine/iodine.go index 2cbec2302..458e10df2 100644 --- a/Godeps/_workspace/src/github.com/minio-io/iodine/iodine.go +++ b/Godeps/_workspace/src/github.com/minio-io/iodine/iodine.go @@ -91,15 +91,18 @@ func GetGlobalStateKey(k string) string { // New - instantiate an error, turning it into an iodine error. // Adds an initial stack trace. func New(err error, data map[string]string) *Error { - entry := createStackEntry() - for k, v := range data { - entry.Data[k] = v - } - return &Error{ - EmbeddedError: err, - ErrorMessage: err.Error(), - Stack: []StackEntry{entry}, + if err != nil { + entry := createStackEntry() + for k, v := range data { + entry.Data[k] = v + } + return &Error{ + EmbeddedError: err, + ErrorMessage: err.Error(), + Stack: []StackEntry{entry}, + } } + return nil } // createStackEntry - create stack entries