ioeric added a comment.

`llvm::ErrorOr` carries `std::error_code`. If you want richer information (e.g. 
error_code + error message), `llvm::Expcted<T>` and `llvm::Error` are your 
friends.

FYI, if you only need error_code + error_message in the returned error, there 
is also `llvm::StringError`. And if you want to carry even more information in 
the errors, you can implement `llvm::ErrorInfo`, which is what we are doing in 
libTooling replacements library: 
https://github.com/llvm-mirror/clang/blob/master/include/clang/Tooling/Core/Replacement.h#L150


https://reviews.llvm.org/D27440



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to