Displaying 6 results from an estimated 6 matches for "objecterror".
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...might be found to be malformed, but at that point there's no context to
tell us that the object that it's in is part of an archive, so the best
diagnostic we could produce is "In foo.o: malformed load command at index
N". A (straw-man) improved system might look like this:
class ObjectError ... { // <- Root of all object-file errors
std::string ArchiveName = "";
std::string ObjectName = "";
std::error_code EC;
void log(raw_ostream &OS) const override {
if (!ArchiveName.empty())
OS << "In archive '" << ArchiveName...
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...point there's no context to
>> tell us that the object that it's in is part of an archive, so the best
>> diagnostic we could produce is "In foo.o: malformed load command at index
>> N". A (straw-man) improved system might look like this:
>>
>> class ObjectError ... { // <- Root of all object-file errors
>> std::string ArchiveName = "";
>> std::string ObjectName = "";
>> std::error_code EC;
>>
>> void log(raw_ostream &OS) const override {
>> if (!ArchiveName.empty())
>>...
2016 Feb 03
6
[RFC] Error handling in LLVM libraries.
...lformed, but at that point there's no context to
> tell us that the object that it's in is part of an archive, so the best
> diagnostic we could produce is "In foo.o: malformed load command at index
> N". A (straw-man) improved system might look like this:
>
> class ObjectError ... { // <- Root of all object-file errors
> std::string ArchiveName = "";
> std::string ObjectName = "";
> std::error_code EC;
>
> void log(raw_ostream &OS) const override {
> if (!ArchiveName.empty())
> OS << "In archive...
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
...o context to
>>> tell us that the object that it's in is part of an archive, so the best
>>> diagnostic we could produce is "In foo.o: malformed load command at index
>>> N". A (straw-man) improved system might look like this:
>>>
>>> class ObjectError ... { // <- Root of all object-file errors
>>> std::string ArchiveName = "";
>>> std::string ObjectName = "";
>>> std::error_code EC;
>>>
>>> void log(raw_ostream &OS) const override {
>>> if (!ArchiveName....
2016 Feb 03
2
[RFC] Error handling in LLVM libraries.
Hi James,
> It seems to me that "[[clang::warn_unused_result]] class TypedError" is probably sufficient for ensuring people check a status return value; I'm not sure runtime checking really brings much additional value there.
I see the attribute as complimentary. The runtime check provides a stronger guarantee: the error cannot be dropped on any path, rather than just "the
2016 Feb 03
13
[RFC] Error handling in LLVM libraries.
Hi All,
I've been thinking lately about how to improve LLVM's error model and error
reporting. A lack of good error reporting in Orc and MCJIT has forced me to
spend a lot of time investigating hard-to-debug errors that could easily
have been identified if we provided richer error information to the client,
rather than just aborting. Kevin Enderby has made similar observations
about the