tbel: refactoring tbUtils with docs #2
This commit is contained in:
		
							parent
							
								
									b86a9d3802
								
							
						
					
					
						commit
						03af2564eb
					
				@ -1154,7 +1154,7 @@ public class TbUtils {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void raiseError(String message, Object value) {
 | 
			
		||||
        String msg = value == null ? message : message + " for value " + value;
 | 
			
		||||
        String msg = value == null ? message : message + " A value of " + value + " is invalid.";
 | 
			
		||||
        throw new RuntimeException(msg);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -891,7 +891,7 @@ public class TbUtilsTest {
 | 
			
		||||
            TbUtils.raiseError(message, value);
 | 
			
		||||
            Assertions.fail("Should throw NumberFormatException");
 | 
			
		||||
        } catch (RuntimeException e) {
 | 
			
		||||
            Assertions.assertTrue(e.getMessage().contains("frequency_weighting_type must be 0, 1 or 2. for value 4"));
 | 
			
		||||
            Assertions.assertTrue(e.getMessage().contains("frequency_weighting_type must be 0, 1 or 2. A value of 4 is invalid."));
 | 
			
		||||
        }
 | 
			
		||||
        try {
 | 
			
		||||
            TbUtils.raiseError(message);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user