code: function NabtoError(category, status, innerError) {
    var err = new Error();
    if (typeof(category) === "undefined") {
      throw new Error("Missing or invalid category");
    }
    this.initStatus(category, status, innerError);
    
    this.__defineGetter__('value', function() {
      return this.code;
    });
  
    this.__defineGetter__('message', function() {
      var msg = this.lookupMessage(this.code);
      if (!msg) {
        msg = 'Code ' + this.toString() + ' (' + this.code + ', Category ' + this.category + ', inner: ' + this.inner;
      }
      if (this.code == NabtoError.Code.P2P_INTERFACE_DEF_INVALID && this.inner.body) {
        msg = msg + ": " + this.inner.body;
      }
      return msg;
    });
  
  }
docs: ////////////////////////////////////////////////////////////////////////////// constructor