[Dive4elements-commits] [PATCH 4 of 4] issue1320: Handle exception
Wald Commits
scm-commit at wald.intevation.org
Tue May 14 07:57:29 CEST 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# 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]);
+ String name = wqkms[idx].getName();
+
+ return new String[] { StringUtil.wWrap(name) };
}
- catch (NumberFormatException nfe) { /* do nothing */ }
-
- String name = wqkms[idx].getName();
-
- return new String[] { StringUtil.wWrap(name) };
+ catch (NumberFormatException nfe) { /* do nothing */
+ logger.error("Cannot get label for " + value + " (" + parts[2] + ")");
+ return new String[] {""};
+ }
}
More information about the Dive4elements-commits
mailing list