use of com.twosigma.beakerx.sql.ReadVariableException in project beakerx by twosigma.
the class SQLCodeRunner method call.
@Override
public TryResult call() throws Exception {
TryResult either;
try {
InternalVariable.setValue(simpleEvaluationObject);
Object r = sqlEvaluator.executeQuery(simpleEvaluationObject.getExpression(), namespaceClient, sqlEvaluator.defaultConnectionString, sqlEvaluator.namedConnectionString);
either = TryResult.createResult(r);
} catch (SQLException e) {
either = TryResult.createError(e.toString());
} catch (ThreadDeath e) {
either = TryResult.createError(INTERUPTED_MSG);
} catch (ReadVariableException e) {
either = TryResult.createError(e.getMessage());
} catch (Throwable e) {
logger.error(e.getMessage());
either = TryResult.createError(e.toString());
}
return either;
}
Aggregations