code: function throwError(token, messageFormat) {
          var error,
              args = Array.prototype.slice.call(arguments, 2),
              msg = messageFormat.replace(
                  /%(\d)/g,
                  function (whole, index) {
                      assert(index < args.length, 'Message reference must be in range');
                      return args[index];
                  }
              );
  
          error = new Error(msg);
          error.index = index;
          error.description = msg;
          throw error;
      }
docs: Throw an exception