You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/12/30 22:06:46 UTC

[2/3] incubator-mynewt-newt git commit: Log all process exec errors

Log all process exec errors


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/1d6987b3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/1d6987b3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/1d6987b3

Branch: refs/heads/develop
Commit: 1d6987b32ed9ef6b123f12abb9a3c56f134e8c01
Parents: 7f5e259
Author: Simon Ratner <si...@probablyprime.net>
Authored: Tue Dec 27 19:53:25 2016 -0800
Committer: Simon Ratner <si...@probablyprime.net>
Committed: Tue Dec 27 20:43:40 2016 -0800

----------------------------------------------------------------------
 newt/vendor/mynewt.apache.org/newt/util/util.go | 7 ++++++-
 util/util.go                                    | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1d6987b3/newt/vendor/mynewt.apache.org/newt/util/util.go
----------------------------------------------------------------------
diff --git a/newt/vendor/mynewt.apache.org/newt/util/util.go b/newt/vendor/mynewt.apache.org/newt/util/util.go
index e3ff437..bc7848b 100644
--- a/newt/vendor/mynewt.apache.org/newt/util/util.go
+++ b/newt/vendor/mynewt.apache.org/newt/util/util.go
@@ -310,7 +310,12 @@ func ShellCommandLimitDbgOutput(
 	}
 
 	if err != nil {
-		return o, NewNewtError(string(o))
+		log.Debugf("err=%s", err.Error())
+		if len(o) > 0 {
+			return o, NewNewtError(string(o))
+		} else {
+			return o, NewNewtError(err.Error())
+		}
 	} else {
 		return o, nil
 	}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1d6987b3/util/util.go
----------------------------------------------------------------------
diff --git a/util/util.go b/util/util.go
index e3ff437..bc7848b 100644
--- a/util/util.go
+++ b/util/util.go
@@ -310,7 +310,12 @@ func ShellCommandLimitDbgOutput(
 	}
 
 	if err != nil {
-		return o, NewNewtError(string(o))
+		log.Debugf("err=%s", err.Error())
+		if len(o) > 0 {
+			return o, NewNewtError(string(o))
+		} else {
+			return o, NewNewtError(err.Error())
+		}
 	} else {
 		return o, nil
 	}