[llvm-dev] [RFC] Error handling in LLVM libraries.

Paweł Bylica via llvm-dev llvm-dev at lists.llvm.org
Thu Feb 18 07:40:16 PST 2016


On Thu, Feb 18, 2016 at 4:36 PM Rafael Espíndola <llvm-dev at lists.llvm.org>
wrote:

> > I like this idea in general. It's a better implementation of what
> > ErrorOr originally was before we removed the custom error support
> > because it wasn't used. In fact I would actually support outright
> > replacing ErrorOr with this if it can be done safely, as I find the
> > name TypedErrorOr a bit long.
>
>
> The main differences are
> * This will hopefully be used.
> * TypedErrorOr is really a TypedError or T. The situation before was
> not that ErrorOr was std::error_code or T.
>
> Since we are adding it, I would also support replacing every use of
> ErrorOr with TypedErrorOr and renaming it.
>

Alternative name could be Expected<T> as proposed by Andrei Alexandrescu.


>
> Cheers,
> Rafael
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160218/aecc831a/attachment.html>


More information about the llvm-dev mailing list