aprantl added a comment. In this design the success_handlers return an exit status *and* set a string error. We could unify this by having the handler return an llvm::Error (https://llvm.org/doxygen/classllvm_1_1Error.html). When it is successful, it returns Error::success, otherwise it returns `llvm::make_error<llvm::StringError>("message", llvm::inconvertibleErrorCode)`. In ReturnMIStatus we do something like
auto status = handler(...) bool exit_status = MIstatus::success; handleAllErrors(status.takeError(), [&](const StringError &error) { his->SetError(error.getMessage(); exit_status = error_handler(); }); return exit_status; https://reviews.llvm.org/D48295 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits