Changeset 7265 for RevitalizationWS
- Timestamp:
- 04/08/10 10:32:10 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
RevitalizationWS/common/trunk/src/main/java/ndg/common/ParserHelper.java
r7244 r7265 1 1 package ndg.common; 2 2 3 import ndg.common.exception.NdgException;4 3 import ndg.common.exception.NdgExecutionException; 5 4 6 5 public class ParserHelper { 7 6 8 /** 9 * @throws NdgException 7 /** 10 8 * Parses a String returning an integer. The <paramName>, while not used in the parsing operation, 11 9 * is used to build the error message, if any. … … 13 11 * @param paramName the name identifying the parameter 14 12 * @return the parsed integer 15 * @throws NdgExecutionException if the <code>String</code> is not parsable 16 * @throws NdgException if<code>stringValue</code> is <code>null</code>13 * @throws NdgExecutionException if the <code>String</code> is not parsable or 14 * <code>stringValue</code> is <code>null</code> 17 15 **/ 18 public static int parseStringToInteger(String stringValue, String paramName) throws NdgEx ception {16 public static int parseStringToInteger(String stringValue, String paramName) throws NdgExecutionException { 19 17 try { 20 18 return Integer.parseInt(stringValue); … … 23 21 new Object[]{paramName, stringValue})); 24 22 } catch (NullPointerException ex) { 25 throw new NdgEx ception(new NdgMessage("null.object",23 throw new NdgExecutionException(new NdgMessage("null.object", 26 24 new Object[]{paramName})); 27 25 }
Note: See TracChangeset
for help on using the changeset viewer.