zaber.motion.exceptions.StreamExecutionException 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 a streamed motion fails.
*/
public class StreamExecutionException extends MotionLibException {
private StreamExecutionExceptionData details;
/**
* @return Additional data for StreamExecutionException
*/
public StreamExecutionExceptionData getDetails() {
return this.details;
}
public StreamExecutionException(String message, byte[] customData) {
super(message);
try {
Main.StreamExecutionExceptionData protobufObj = Main.StreamExecutionExceptionData.parser().parseFrom(customData);
this.details = StreamExecutionExceptionData.fromProtobuf(protobufObj);
} catch (InvalidProtocolBufferException e) {
throw new LibraryIntegrationException("Could not parse custom data for StreamExecutionException", e);
}
}
public StreamExecutionException(String message, StreamExecutionExceptionData customData) {
super(message);
this.details = customData;
}
}