-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Error overhaul #33532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error overhaul #33532
Conversation
base/error.jl
Outdated
| ## system error handling ## | ||
| """ | ||
| systemerror(sysfunc, iftrue) | ||
| windowserror(sysfunc[, errno::Cint=Libc.errno()]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| windowserror(sysfunc[, errno::Cint=Libc.errno()]) | |
| systemerror(sysfunc[, errno::Cint=Libc.errno()]) |
| DWORD *plast_error = (DWORD*)(__readfsdword(0x18) + 0x34); | ||
| DWORD last_error = *plast_error; | ||
| #else | ||
| DWORD last_error = GetLastError(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch this is an unfortunate design in the windows API...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, and this is not a good place to be having lots of extra function calls, so I'm inlining just the real meat of it (when possible). OTOH, wasn't it great to know that the operation of loading the gc-frame was always successful?
|
@Keno can you fix the analyzegc pass for https://build.julialang.org/#/builders/146/builds/3029/steps/3/logs/stdio |
|
Just add it to the whitelist: https://github.com/JuliaLang/julia/blob/master/src/clangsa/GCChecker.cpp#L767 |
a408578 to
e9ae67d
Compare
|
@JeffBezanson could you review 3905102 (now squashed into here)? |
|
I also dropped the clipboard fixes from here, since the buildbots are having trouble. Will revive that from https://github.com/JuliaLang/julia/tree/jn/error-clipboard once this is merged. |
and simplify some of the code and makefile rules
This is helpful when doing proper cleanup, which might otherwise clear the error code.
Previously, we were returning the error code from `stat` instead (success) in some cases. Also make it unicode text, while we're here. Fix #15117
|
Is this really feasible to backport? |
Fixes for internal (and sometimes external) handling of error codes. This should fix most of the cases where we report the wrong error code, although some cases might still be hanging around (with the most likely culprits now being any sort of logging code).