这个conn.run怎么判断是成功,还是失败,或者失败原因呢?

在dolphinDB API中,这个run怎么判断是成功,还是失败,或者失败原因呢?

Entity entity = conn.run(saveFuncName, args);
请先 登录 后评论

1 个回答

Juntao Wang

DolphinDB API的处理问题的方式是抛出异常,因此需要try catch一下exception,比如:

 try {
    
    Entity entity = conn.run(saveFuncName, args);

 } catch (exception &ex) {
        cout << "Failed to  run  with error: " << ex.what();
        return -1;
 }
请先 登录 后评论