org.embulk.input.tsurugidb.ServerRuntimeException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of embulk-input-tsurugidb Show documentation
Show all versions of embulk-input-tsurugidb Show documentation
Selects records from a table.
The newest version!
package org.embulk.input.tsurugidb;
import com.tsurugidb.tsubakuro.exception.ServerException;
@SuppressWarnings("serial")
public class ServerRuntimeException extends RuntimeException {
public ServerRuntimeException(ServerException cause) {
super(createMessage(cause), cause);
}
protected static String createMessage(ServerException e) {
var code = e.getDiagnosticCode();
if (code != null) {
return code.name() + ": " + e.getMessage();
} else {
return e.getMessage();
}
}
@Override
public ServerException getCause() {
return (ServerException) super.getCause();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy