[PATCH] D87987: [llvm-objcopy][NFC] refactor error handling. part 3.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 03:04:08 PDT 2020


jhenderson added a comment.

In D87987#2302840 <https://reviews.llvm.org/D87987#2302840>, @avl wrote:

> So, what about current solution in this patch to report fatal errors through Expected<>/Error in llvm-objcopy? Is it OK to do things that way? My understanding is that currently only fatal errors are reported and then no need to create handlers at the moment.

I'm waiting on others feedback to see what they think. The advantage of the handler is that it would allow us to simplify the error handling a little probably (less of a need to repeatedly check for error/takeError patterns etc). The downside is the need for the handler, and the fact that there'd need to be some way of bailing out once an error is hit (the handler could be noreturn or something like that, I suppose).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87987/new/

https://reviews.llvm.org/D87987



More information about the llvm-commits mailing list