All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.artemis.InvalidComponentException Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package com.artemis;

import com.artemis.utils.reflect.ClassReflection;

@SuppressWarnings("serial")
public class InvalidComponentException extends RuntimeException {

	private Class componentClass;

	public InvalidComponentException(Class componentClass, String string) {
		super(message(componentClass, string));
		this.componentClass = componentClass;
	}

	public InvalidComponentException(Class componentClass, String string, Exception e) {
		super(message(componentClass, string), e);
		this.componentClass = componentClass;
	}
	
	private static String message(Class componentClass, String string) {
		return ClassReflection.getSimpleName(componentClass) + ": " + string;
	}

	public Class getComponentClass() {
		return componentClass;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy