• Tor Lillqvist's avatar
    Introduce UnixErrnoString() and use it in sal/osl/unx · 22a2ed83
    Tor Lillqvist yazdı
    The UnixErrnoString() function returns the symbolic name of an errno
    value, like "ENOENT". For now this is local to sal/osl/unx.
    
    If it can't figure out the symbolic name, it returns it as a number
    followed by the cleartext description (as from strerror()) in
    parentheses.
    
    Rationale why to use this and not strerror(): This is intended to be
    used in SAL_INFO() and SAL_WARN(). Such messages are intended to be
    read by developers, not end-users. Developers are (or should be)
    familiar with symbolic errno names in code anyway. The symbolic names
    of errno values are (or should be) instantly recognizable as such,
    they all start with E and are in UPPERCASE.
    
    strerror() can be localised although in LibreOffice it apparently
    isn't as there allegedly aren't setlocale() calls. But, anyway, the
    error strings might be less familiar to a developer than the symbolc
    errno names that one uses when coding.
    
    When encountering an unfamiliar error string the developer might want
    to add special handling for that error case in the code. They would
    need a reverse mapping from error string to errno value, by manually
    searching <errno.h>, looking at the comments there, hoping the match
    what strerror() produces, to find the corresponding symbolic errno
    value.
    
    Change-Id: Idc11595d528e8432a32bf474e6791f4ea7262a1e
    Reviewed-on: https://gerrit.libreoffice.org/61931
    Tested-by: Jenkins
    Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
    22a2ed83
Adı
Son kayıt (commit)
Son güncelleme
..
android Loading commit data...
cppunittester Loading commit data...
inc Loading commit data...
osl Loading commit data...
qa Loading commit data...
rtl Loading commit data...
test Loading commit data...
textenc Loading commit data...
util Loading commit data...
CppunitTest_Module_DLL.mk Loading commit data...
CppunitTest_sal_osl.mk Loading commit data...
CppunitTest_sal_osl_security.mk Loading commit data...
CppunitTest_sal_rtl.mk Loading commit data...
CppunitTest_sal_types.mk Loading commit data...
Executable_cppunittester.mk Loading commit data...
Executable_osl_process_child.mk Loading commit data...
Library_lo-bootstrap.mk Loading commit data...
Library_sal.mk Loading commit data...
Library_sal_textenc.mk Loading commit data...
Makefile Loading commit data...
Module_sal.mk Loading commit data...
README Loading commit data...