zaber.motion.exceptions.MovementInterruptedException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of motion-library Show documentation
Show all versions of motion-library Show documentation
A library that aims to provide easy-to-use API for communication with Zaber devices using Zaber ASCII Protocol.
// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //
// ============== DO NOT EDIT DIRECTLY ============== //
package zaber.motion.exceptions;
import zaber.motion.protobufs.Main;
import com.google.protobuf.InvalidProtocolBufferException;
/**
* Thrown when ongoing movement is interrupted by another command or user input.
*/
public class MovementInterruptedException extends MotionLibException {
private MovementInterruptedExceptionData details;
/**
* @return Additional data for MovementInterruptedException
*/
public MovementInterruptedExceptionData getDetails() {
return this.details;
}
public MovementInterruptedException(String message, byte[] customData) {
super(message);
try {
Main.MovementInterruptedExceptionData protobufObj = Main.MovementInterruptedExceptionData.parser().parseFrom(customData);
this.details = MovementInterruptedExceptionData.fromProtobuf(protobufObj);
} catch (InvalidProtocolBufferException e) {
throw new LibraryIntegrationException("Could not parse custom data for MovementInterruptedException", e);
}
}
public MovementInterruptedException(String message, MovementInterruptedExceptionData customData) {
super(message);
this.details = customData;
}
}