|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| MissingStdParameterException.java | - | 0% | 0% | 0% |
|
||||||||||||||
| 1 | /** | |
| 2 | * JTRunner is free software; you can redistribute it and/or modify it under the | |
| 3 | * terms of the GNU General Public License as published by the Free Software | |
| 4 | * Foundation; either version 2, or (at your option) any later version. | |
| 5 | */ | |
| 6 | ||
| 7 | package jtr.assigner; | |
| 8 | ||
| 9 | /** | |
| 10 | * This exception is thrown whenever an <code>IParamsAssigner</code> cannot | |
| 11 | * find in the provided <code>RunnerConnfig</code> instance one of the JTR | |
| 12 | * standard parameters. This means that probabily the <code>jtr.xml</code> | |
| 13 | * configuration file is missing that information. | |
| 14 | * | |
| 15 | * @author Francesco Russo (frusso@dev.java.net) | |
| 16 | * @version 4.0 | |
| 17 | * @since 1.0 | |
| 18 | */ | |
| 19 | public class MissingStdParameterException extends RuntimeException { | |
| 20 | /** | |
| 21 | * | |
| 22 | */ | |
| 23 | private static final long serialVersionUID = -6625967278887018129L; | |
| 24 | ||
| 25 | /** | |
| 26 | * Constructs a MissingStdParameterException without a message. | |
| 27 | * @param param The missing parameter | |
| 28 | */ | |
| 29 | 0 | public MissingStdParameterException(String param) { |
| 30 | 0 | super(); |
| 31 | 0 | this.param = param; |
| 32 | } | |
| 33 | ||
| 34 | /** | |
| 35 | * Constructs a MissingStdParameterException with a detailed message. | |
| 36 | * | |
| 37 | * @param message | |
| 38 | * The message associated with the exception. | |
| 39 | * @param param The missing parameter | |
| 40 | */ | |
| 41 | 0 | public MissingStdParameterException(String message, String param) { |
| 42 | 0 | super(message); |
| 43 | 0 | this.param = param; |
| 44 | } | |
| 45 | ||
| 46 | /** | |
| 47 | * Constructs a MissingStdParameterException with a detailed message and a | |
| 48 | * root cause | |
| 49 | * | |
| 50 | * @param message | |
| 51 | * String The message associated with the exception. | |
| 52 | * @param param | |
| 53 | * String The missing standard parameter | |
| 54 | * @param root | |
| 55 | * Throwable The root cause | |
| 56 | */ | |
| 57 | 0 | public MissingStdParameterException(String message, String param, Throwable root) { |
| 58 | 0 | super(message, root); |
| 59 | 0 | this.param = param; |
| 60 | } | |
| 61 | ||
| 62 | /** | |
| 63 | * Returns the missing standard parameter name. | |
| 64 | * | |
| 65 | * @return String The missing parameter | |
| 66 | */ | |
| 67 | 0 | public String getParam() { |
| 68 | 0 | return param; |
| 69 | } | |
| 70 | ||
| 71 | private String param; | |
| 72 | } |
|
||||||||||