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

lejos.remote.nxt.LCPException Maven / Gradle / Ivy

Go to download

leJOS (pronounced like the Spanish word "lejos" for "far") is a tiny Java Virtual Machine. In 2013 it was ported to the LEGO EV3 brick.

The newest version!
package lejos.remote.nxt;

import java.io.IOException;

public class LCPException extends IOException
{
	private byte errorcode;
	
	public LCPException() {
		super();
	}

	public LCPException(String s) {
		super(s);
	}
	
	public LCPException(byte errorcode) {
		this(ErrorMessages.lcpErrorToString(errorcode));
		this.errorcode = errorcode;
	}
	
	public LCPException(String s, Throwable cause) {
		this(s);
		this.initCause(cause);
	}
	
	/**
	 * Returns error code, if this exception was caused by the NXT returned an LCP error.
	 * @return non-zero balue of there the NXT provided an error code or zero otherwise.
	 */
	public byte getErrorcode() {
		return this.errorcode;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy