You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What new or enhanced feature are you proposing?
It is necessary to improve error reporting in existent code base. In many
places when the cause of error is unknown the implementation chooses to return
-1 value. It coincides with value -EPERM, and higher level routine interpreting
error code often misinterprets it or ends up printing "Not permitted" (result
of calling strerror(EPERM)). Therefore typically the message gives improper
diagnostics, confuses the user and distracts it from the real reason of the
failure. Other manifestation is that there are places which do 'return -1'
implying 'return -EPERM', therefore code lacks clarity.
What goals would this enhancement help you to achieve?
Improve error diagnostics.
Improve code clarity.
How are you going to implement the enhancement?
EPERM definition in errno.h is temporarily changed, therefore "Unknown error
code. PLEASE REPORT!" will be printed instead. Developers and uses are
encouraged to report these cases.
As it is generally impossible to automatically distinguish between correct and
erroneous use of 'return -1', only manual cleanup can completelty solve the
problem.
Original issue reported on code.google.com by [email protected] on 9 Jan 2013 at 3:08
The text was updated successfully, but these errors were encountered:
Another source of "Unknown error code" is found. There are places where
implementation interprets return value of some function as error code, whereas
function specification doesn't say so (typically separate quering of "errno" is
required to obtain actual error code). These occasions should also be fixed
or/and reported.
Original issue reported on code.google.com by
[email protected]
on 9 Jan 2013 at 3:08The text was updated successfully, but these errors were encountered: