From: Ian Jackson Date: Fri, 27 Aug 2010 22:25:14 +0000 (+0100) Subject: pctb upload: Print and throw an error if there are no offers X-Git-Tag: 0.9.8~2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=jarrg-ian.git;a=commitdiff_plain;h=164d6fa66b076929247d865267519663aa6c8440 pctb upload: Print and throw an error if there are no offers --- diff --git a/src/com/tedpearson/ypp/market/MarketUploader.java b/src/com/tedpearson/ypp/market/MarketUploader.java index d8efac5..715e847 100644 --- a/src/com/tedpearson/ypp/market/MarketUploader.java +++ b/src/com/tedpearson/ypp/market/MarketUploader.java @@ -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; }