[PATCH] error_code for dynamically generated error messages
Rafael Ávila de Espíndola
rafael.espindola at gmail.com
Thu May 22 22:39:04 PDT 2014
Will this work with the std::error_code once we switch?
As far as style goes I probably like the clang model best: pass an
DiagnosticsEngine down instead of passing the error back up. That way
we separate two concepts
* an error we want to report to the user: foo.o in bar.a is corrupted.
* an error condition we want to handle: open failed with no_such_file
in /usr/lib/libfoo.so. The caller will check the error_code and try
the next directory.
But I agree that this is isolated enough that it is fine if it also
works with std::error_code.
http://reviews.llvm.org/D3881
More information about the llvm-commits
mailing list