("null")));
("null")) + " on task " + task);
  public static boolean registerCargoInstance(      Registry toReg,       List toCargoIds,      Asset instAsset) {    if (instAsset instanceof AssetGroup) { // happens most of the time      // divide group into separate assets      List groupL = assetHelper.expandAssetGroup((AssetGroup)instAsset);      int n = groupL.size();      for (int i = 0; i < n; i++) {        Asset ai = (Asset)groupL.get(i);        UID aiId = null;        try {          aiId = registerCargoInstance(toReg, ai);        } catch (RuntimeException e) {	  e.printStackTrace();          throw new IllegalArgumentException(              "Unable to expand assetGroup "+              ((instAsset != null) ?               ("(UID: "+instAsset.getUID()+")") :               ("null")) + " element["+i+"]: "+              ((ai != null) ?                ("(UID: "+ai.getUID()+")") :               ("null")));        }        toCargoIds.add(aiId);      }    } else {      // add the single element      UID aiId = registerCargoInstance(toReg, instAsset);      toCargoIds.add(aiId);    }    return true; // handled successfully  }