chiark / gitweb /
pctb upload: Print and throw an error if there are no offers
[jarrg-ian.git] / src / com / tedpearson / ypp / market / MarketUploader.java
index d8efac50a27d23dbcf5b84cff45ada8efabc99a3..715e847b895eac70e691b0fce699ea256b01edc0 100644 (file)
@@ -667,6 +667,10 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
                                System.err.println("Error: Unsupported Commodity \"" + offer.get(0) + "\"");
                        }
                }
+               if (buySellCount[0]==0 && buySellCount[1]==0) {
+                   error("No (valid) offers for PCTB?!");
+                   throw new IllegalArgumentException();
+               }
                return buySellCount;
        }