summaryrefslogtreecommitdiff
path: root/src/de/lmu/ifi/dbs/elki/utilities/optionhandling/WrongParameterValueException.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/utilities/optionhandling/WrongParameterValueException.java')
-rw-r--r--src/de/lmu/ifi/dbs/elki/utilities/optionhandling/WrongParameterValueException.java22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/utilities/optionhandling/WrongParameterValueException.java b/src/de/lmu/ifi/dbs/elki/utilities/optionhandling/WrongParameterValueException.java
index 219b32cd..c51eae0e 100644
--- a/src/de/lmu/ifi/dbs/elki/utilities/optionhandling/WrongParameterValueException.java
+++ b/src/de/lmu/ifi/dbs/elki/utilities/optionhandling/WrongParameterValueException.java
@@ -27,6 +27,8 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter;
/**
* Thrown by a Parameterizable object in case of wrong parameter format.
+ *
+ * @author Steffi Wanka
*/
public class WrongParameterValueException extends ParameterException {
/**
@@ -40,7 +42,7 @@ public class WrongParameterValueException extends ParameterException {
* @param parameter the parameter that has a wrong value
* @param read the value of the parameter read by the option handler
*/
- public WrongParameterValueException(Parameter<?,?> parameter, String read) {
+ public WrongParameterValueException(Parameter<?> parameter, String read) {
this("Wrong value of parameter \"" + parameter.getName() + "\".\n" + "Read: " + read + ".\n" + "Expected: " + parameter.getFullDescription());
}
@@ -51,8 +53,8 @@ public class WrongParameterValueException extends ParameterException {
* @param read the value of the parameter read by the option handler
* @param cause the cause
*/
- public WrongParameterValueException(Parameter<?, ?> parameter, String read, Throwable cause) {
- this("Wrong value of parameter \"" + parameter.getName() + "\".\n" + "Read: " + read + ".\n" + "Expected: " + parameter.getFullDescription(), cause);
+ public WrongParameterValueException(Parameter<?> parameter, String read, Throwable cause) {
+ this("Wrong value of parameter \"" + parameter.getName() + "\".\n" + "Read: " + read + ".\n" + "Expected: " + parameter.getFullDescription() + "\n" + cause.getMessage(), cause);
}
/**
@@ -63,8 +65,8 @@ public class WrongParameterValueException extends ParameterException {
* @param reason detailed error description
* @param cause the cause
*/
- public WrongParameterValueException(Parameter<?, ?> parameter, String read, String reason, Throwable cause) {
- this("Wrong value of parameter " + parameter.getName() + ".\n" + "Read: " + read + ".\n" + "Expected: " + parameter.getFullDescription()+"\n"+reason, cause);
+ public WrongParameterValueException(Parameter<?> parameter, String read, String reason, Throwable cause) {
+ this("Wrong value of parameter " + parameter.getName() + ".\n" + "Read: " + read + ".\n" + "Expected: " + parameter.getFullDescription() + "\n" + reason + "\n" + cause.getMessage(), cause);
}
/**
@@ -74,8 +76,8 @@ public class WrongParameterValueException extends ParameterException {
* @param read the value of the parameter read by the option handler
* @param reason detailed error description
*/
- public WrongParameterValueException(Parameter<?, ?> parameter, String read, String reason) {
- this("Wrong value of parameter " + parameter.getName() + ".\n" + "Read: " + read + ".\n" + "Expected: " + parameter.getFullDescription()+"\n"+reason);
+ public WrongParameterValueException(Parameter<?> parameter, String read, String reason) {
+ this("Wrong value of parameter " + parameter.getName() + ".\n" + "Read: " + read + ".\n" + "Expected: " + parameter.getFullDescription() + "\n" + reason);
}
/**
@@ -86,7 +88,7 @@ public class WrongParameterValueException extends ParameterException {
public WrongParameterValueException(String message) {
super(message);
}
-
+
/**
* Thrown by a Parameterizable object in case of wrong parameter format.
*
@@ -94,6 +96,6 @@ public class WrongParameterValueException extends ParameterException {
* @param e cause
*/
public WrongParameterValueException(String message, Throwable e) {
- super(message,e );
+ super(message, e);
}
-} \ No newline at end of file
+}