From dabb84f62a35ea67793425f9118ea6a5bca96e00 Mon Sep 17 00:00:00 2001 From: solonovamax Date: Tue, 1 Nov 2022 12:27:04 -0400 Subject: Cleanup launcher classes Cleanup a bunch of the code in launcher classes - Migrate the majority of the reflection to ReflectionUtils - Decrease logic in AbstractLauncher - Add logging to launcher classes at FINE level - make mcParams in AbstractLauncher an immutable list to prevent runtime manipulation - StandardLauncher instead copies the list to modify it Signed-off-by: solonovamax --- .../exception/ParameterNotFoundException.java | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'libraries/launcher/org/prismlauncher/exception/ParameterNotFoundException.java') diff --git a/libraries/launcher/org/prismlauncher/exception/ParameterNotFoundException.java b/libraries/launcher/org/prismlauncher/exception/ParameterNotFoundException.java index c083e02a..3dd6efc3 100644 --- a/libraries/launcher/org/prismlauncher/exception/ParameterNotFoundException.java +++ b/libraries/launcher/org/prismlauncher/exception/ParameterNotFoundException.java @@ -54,10 +54,28 @@ package org.prismlauncher.exception; + +@SuppressWarnings("serial") public final class ParameterNotFoundException extends IllegalArgumentException { - public ParameterNotFoundException(String key) { - super("Unknown parameter name: " + key); + public ParameterNotFoundException(String message, Throwable cause) { + super(message, cause); + } + + public ParameterNotFoundException(Throwable cause) { + super(cause); + } + + public ParameterNotFoundException(String message) { + super(message); + } + + public ParameterNotFoundException() { + super(); + } + + public static ParameterNotFoundException forParameterName(String parameterName) { + return new ParameterNotFoundException(String.format("Unknown parameter name '%s'", parameterName)); } } -- cgit