error management simplification
authorLuc Yriarte <luc.yriarte@intel.com>
Fri, 28 Jun 2013 13:55:41 +0000 (15:55 +0200)
committerLuc Yriarte <luc.yriarte@intel.com>
Fri, 28 Jun 2013 13:55:41 +0000 (15:55 +0200)
cloudeebus/cloudeebus.js

index 81dbf16..f3a7996 100644 (file)
@@ -45,14 +45,8 @@ cloudeebus.log = function(msg) {
 };
 
 cloudeebus.getError = function(error) {
-       if (error.desc && error.uri)
-               return error.desc + " : " + error.uri;
        if (error.desc)
                return error.desc;
-       if (error.uri)
-               return error.uri;
-       if (error.name && error.message)
-               return error.name + " : " + error.message;
        if (error.message)
                return error.message;
        return error;
@@ -942,7 +936,7 @@ cloudeebus.ProxyObject.prototype.connectToSignal = function(ifName, signal, hand
                var errorStr = cloudeebus.getError(error);
                cloudeebus.log("Error connecting to signal: " + signal + " on object: " + self.objectPath + " : " + errorStr);
                if (errorCB)
-                       errorCB(cloudeebus.getError(errorStr));
+                       errorCB(errorStr);
        }
 
        var arglist = [