search for: ecerror

Displaying 11 results from an estimated 11 matches for "ecerror".

2016 Feb 03
13
[RFC] Error handling in LLVM libraries.
...object-creation APIs of libObject and using custom error classes to report errors in MachO headers. My initial experience is that this has enabled much richer error messages than are possible with std::error_code. To enable interaction with APIs that still use std::error_code I have added a custom ECError class that wraps a std::error_code, and can be converted back to a std::error_code using the typedErrorToErrorCode function. For now, all custom error code classes should (and do, in the prototype) derive from this utility class. In my experiments, this has made it easy to thread TypedError selecti...
2016 Feb 09
3
[RFC] Error handling in LLVM libraries.
Hi Rafael, > The main thing I like about the diagnostic system is that it lets us > differentiate two related but independent concepts: > > * Giving the human using the program diagnostics about what went wrong. > * Propagating an error to the caller so that the upper library layer > can handle it or pass it up the stack. I don't think these are really independent. Whether
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...libObject and using custom error classes to report errors in MachO > headers. My initial experience is that this has enabled much richer error > messages than are possible with std::error_code. > > To enable interaction with APIs that still use std::error_code I have > added a custom ECError class that wraps a std::error_code, and can be > converted back to a std::error_code using the typedErrorToErrorCode > function. For now, all custom error code classes should (and do, in the > prototype) derive from this utility class. In my experiments, this has made > it easy to threa...
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...Is of libObject and using custom error classes to report errors in MachO headers. My initial experience is that this has enabled much richer error messages than are possible with std::error_code. >> >> To enable interaction with APIs that still use std::error_code I have added a custom ECError class that wraps a std::error_code, and can be converted back to a std::error_code using the typedErrorToErrorCode function. For now, all custom error code classes should (and do, in the prototype) derive from this utility class. In my experiments, this has made it easy to thread TypedError selecti...
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...to report >>> errors in MachO headers. My initial experience is that this has enabled >>> much richer error messages than are possible with std::error_code. >>> >>> To enable interaction with APIs that still use std::error_code I have >>> added a custom ECError class that wraps a std::error_code, and can be >>> converted back to a std::error_code using the typedErrorToErrorCode >>> function. For now, all custom error code classes should (and do, in the >>> prototype) derive from this utility class. In my experiments, this has ma...
2016 Feb 03
6
[RFC] Error handling in LLVM libraries.
...custom error classes to report >> errors in MachO headers. My initial experience is that this has enabled >> much richer error messages than are possible with std::error_code. >> >> To enable interaction with APIs that still use std::error_code I have >> added a custom ECError class that wraps a std::error_code, and can be >> converted back to a std::error_code using the typedErrorToErrorCode >> function. For now, all custom error code classes should (and do, in the >> prototype) derive from this utility class. In my experiments, this has made >>...
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...gt;> errors in MachO headers. My initial experience is that this has enabled >>>> much richer error messages than are possible with std::error_code. >>>> >>>> To enable interaction with APIs that still use std::error_code I have >>>> added a custom ECError class that wraps a std::error_code, and can be >>>> converted back to a std::error_code using the typedErrorToErrorCode >>>> function. For now, all custom error code classes should (and do, in the >>>> prototype) derive from this utility class. In my experiments,...
2017 Jul 06
2
ErrorInfo::message() possibly broken in LLVM-4.0.1
...ut over unitialized bytes. llvm::Expected<llvm::object::OwningBinary<llvm::object::ObjectFile>> e = llvm::object::ObjectFile::createObjectFile(llvm::StringRef(fname)); if (!e) { llvm::handleAllErrors(e.takeError(), [](const llvm::ErrorInfo<llvm::ECError> &EI) { std::cerr << EI.message() << std::endl; }); return 1; } Am I doing something wrong here? -- Will Song
2016 Feb 11
2
[RFC] Error handling in LLVM libraries.
...new section of the LLVM Programmer's Manual describing its use. (2) Re-submit the original prototype (with minor tweaks) plus the unit-tests and programmers manual additions to llvm-commits fro review. (3) Begin threading TypedError and TypedErrorOr through MachOObjectFile in libObject, using ECError as a bridge between TypedError/TypedErrorOr and std::error_code/ErrorOr. The act of threading this through libObject will hit LLD, MCJIT and ORC, DebugInfo, LTO, ProfilingData and a host of command-line utilities. However, the ECError glue is fairly straightforward and idiomatic, and provides us w...
2016 Feb 10
4
[RFC] Error handling in LLVM libraries.
Hi Rafael, > What prevents you from using a diag handler in the jit server that > sends errors/warnings over the RPCChannel? What would you do with errors that can't reasonable be serialized when they reach the diagnostic handler? And what would you do with the serialized bytes on the client end? - Lang. Sent from my iPhone On Feb 10, 2016, at 10:31 AM, Rafael EspĂ­ndola
2016 Feb 10
5
[RFC] Error handling in LLVM libraries.
...it until > we have a concrete case where that is needed. The error infrastructure investment is largely done, and I'm volunteering to maintain it. Myself and Kevin Enderby are signing up to weave this through libObject and the JIT. Other libraries could be converted as people see fit, with ECError providing an interface between the std::error_code world and TypedError. > Given that I would > suggest going the more incremental way. Add a CheckedError that wraps > error_code and use to make sure the errors are checked. When a better > diagnostic is needed, pass in a diagnostic han...