comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelSelectState.java @ 6016:d24d29d9efa7

issue1320: Handle exception.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 14 May 2013 07:53:51 +0200
parents af13ceeba52a
children f89ad512f426
comparison
equal deleted inserted replaced
6015:e514cab94026 6016:d24d29d9efa7
142 } 142 }
143 143
144 int idx = -1; 144 int idx = -1;
145 try { 145 try {
146 idx = Integer.parseInt(parts[2]); 146 idx = Integer.parseInt(parts[2]);
147 } 147 String name = wqkms[idx].getName();
148 catch (NumberFormatException nfe) { /* do nothing */ } 148
149 149 return new String[] { StringUtil.wWrap(name) };
150 String name = wqkms[idx].getName(); 150 }
151 151 catch (NumberFormatException nfe) { /* do nothing */
152 return new String[] { StringUtil.wWrap(name) }; 152 logger.error("Cannot get label for " + value + " (" + parts[2] + ")");
153 return new String[] {""};
154 }
153 } 155 }
154 156
155 157
156 /** 158 /**
157 * Validates the given String. A valid string for this state requires the 159 * Validates the given String. A valid string for this state requires the

http://dive4elements.wald.intevation.org