int timeout = (policy == null)? 0 : policy.timeout;
Connection conn = node.getConnection(timeout);
try {
Info info = new Info(conn, command);
NameValueParser parser = info.getNameValueParser();
String error = null;
String file = null;
String line = null;
String message = null;
while (parser.next()) {
String name = parser.getName();
if (name.equals("error")) {
error = parser.getValue();
}
else if (name.equals("file")) {
file = parser.getValue();
}
else if (name.equals("line")) {
line = parser.getValue();
}
else if (name.equals("message")) {
message = parser.getStringBase64();
}
}
if (error != null) {
throw new AerospikeException("Registration failed: " + error + Environment.Newline +