apolyakov added a comment. In https://reviews.llvm.org/D48295#1136663, @aprantl wrote:
> 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; > I don't completely understand what you mean. First of all, what do you mean when talking about success_handlers? 'cause if you mean success_handler from `Execute` function, then I should say that it doesn't have to set an error, it might be any. Secondly, `status` in your example is a function, how can it has a `takeError` method? https://reviews.llvm.org/D48295 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits