GitHub user nwellnhof opened a pull request:

    https://github.com/apache/lucy/pull/52

    Stop using strerror

    Especially with non-English locales, 'strerror' can return strings in
    arbitrary encodings. Now that CB_VCatF has more thorough UTF-8 checks,
    this can result in unwanted exceptions.
    
    'strerror' also isn't thread-safe.
    
    Add some utility functions to set the global error object, optionally
    followed by a textual representation of the error in 'errno' or
    returned by 'GetLastError' on Windows. Convert 'errno' values using
    custom messages for all 'errno' macros from current Linux and Darwin
    kernels.
    
    Also make some error messages more informative by adding the reason
    for the error, e.g. in FSDH_do_open which may fail when opening an
    index.
    
    Fixes LUCY-311.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nwellnhof/lucy 0.6

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucy/pull/52.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #52
    
----
commit 7467be5a0425db53ec7e7080063310f810092712
Author: Nick Wellnhofer <wellnho...@aevum.de>
Date:   2016-10-08T14:16:48Z

    Stop using strerror
    
    Especially with non-English locales, 'strerror' can return strings in
    arbitrary encodings. Now that CB_VCatF has more thorough UTF-8 checks,
    this can result in unwanted exceptions.
    
    'strerror' also isn't thread-safe.
    
    Add some utility functions to set the global error object, optionally
    followed by a textual representation of the error in 'errno' or
    returned by 'GetLastError' on Windows. Convert 'errno' values using
    custom messages for all 'errno' macros from current Linux and Darwin
    kernels.
    
    Also make some error messages more informative by adding the reason
    for the error, e.g. in FSDH_do_open which may fail when opening an
    index.
    
    Fixes LUCY-311.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to