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 <solonovamax@12oclockpoint.com>
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -54,10 +54,31 @@
|
||||
|
||||
package org.prismlauncher.exception;
|
||||
|
||||
|
||||
@SuppressWarnings({ "serial", "unused" })
|
||||
public final class ParseException extends IllegalArgumentException {
|
||||
|
||||
public ParseException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public ParseException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public ParseException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public ParseException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static ParseException forInputString(String inputString) {
|
||||
return new ParseException(String.format("Could not parse input string '%s'", inputString));
|
||||
}
|
||||
|
||||
public static ParseException forInputString(String inputString, Throwable cause) {
|
||||
return new ParseException(String.format("Could not parse input string '%s'", inputString), cause);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user