# HG changeset patch # User Felix Wolfsteller # Date 1368510831 -7200 # Node ID d24d29d9efa7a43552bc699ad8cc2e8f10cc48ae # Parent e514cab94026d8f9115847f7b0f7860b7ad337fc issue1320: Handle exception. diff -r e514cab94026 -r d24d29d9efa7 artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelSelectState.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelSelectState.java Mon May 13 18:33:01 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelSelectState.java Tue May 14 07:53:51 2013 +0200 @@ -144,12 +144,14 @@ int idx = -1; try { idx = Integer.parseInt(parts[2]); - } - catch (NumberFormatException nfe) { /* do nothing */ } + String name = wqkms[idx].getName(); - String name = wqkms[idx].getName(); - - return new String[] { StringUtil.wWrap(name) }; + return new String[] { StringUtil.wWrap(name) }; + } + catch (NumberFormatException nfe) { /* do nothing */ + logger.error("Cannot get label for " + value + " (" + parts[2] + ")"); + return new String[] {""}; + } }