[PATCH] D19883: [Support/Error] Add a string conversion method to Error
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue May 3 13:00:50 PDT 2016
vsk added a comment.
Lang and I discusses this off-list and reached the conclusion that it makes more sense to have a *destructive* toString operation on ErrorInfoBase (not Error).
That's because: 1) the whole point of Error is to enforce centralized error handling, and 2) the Error class should just handle ownership -- we already use ErrorInfoBase for `log` so `message` really belongs there.
Lang's example of a use-case for a non-destructive `toString` method is interesting but I haven't run into such a use case in practice. So, we can defer that until it's needed.
http://reviews.llvm.org/D19883
More information about the llvm-commits
mailing list