Changeset 7265


Ignore:
Timestamp:
04/08/10 10:32:10 (9 years ago)
Author:
mnagni
Message:

Minor changes to some Exception strategy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • RevitalizationWS/common/trunk/src/main/java/ndg/common/ParserHelper.java

    r7244 r7265  
    11package ndg.common; 
    22 
    3 import ndg.common.exception.NdgException; 
    43import ndg.common.exception.NdgExecutionException; 
    54 
    65public class ParserHelper { 
    76         
    8         /** 
    9          * @throws NdgException  
     7        /**  
    108         * Parses a String returning an integer. The <paramName>, while not used in the parsing operation,  
    119         * is used to build the error message, if any. 
     
    1311         * @param paramName the name identifying  the parameter 
    1412         * @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> 
    1715         **/ 
    18         public static int parseStringToInteger(String stringValue, String paramName) throws NdgException { 
     16        public static int parseStringToInteger(String stringValue, String paramName) throws NdgExecutionException { 
    1917                try { 
    2018                        return Integer.parseInt(stringValue);    
     
    2321                                        new Object[]{paramName, stringValue})); 
    2422                } catch (NullPointerException ex) { 
    25                         throw new NdgException(new NdgMessage("null.object",  
     23                        throw new NdgExecutionException(new NdgMessage("null.object",  
    2624                                        new Object[]{paramName})); 
    2725                } 
Note: See TracChangeset for help on using the changeset viewer.