tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: prop_dictionary_internalize_from_file help

    Date:        Wed, 16 Dec 2009 08:42:17 +0100
    From:        Adam Hamsik <>
    Message-ID:  <>

  | I barely remember that prop_dictionary_internalize_from_file returns
  | bad error when it can't parse eternalized dictionary.

The man page doesn't say that errno means anything when the proplib
functions return, which generally means that it doesn't, hence
using perror() (or strerror()) will just lead to confusion.

(And the source code supports the theory that returning anything
sensible in errno is not intended).

That function returns NULL to indicate "something went wrong", it
seems to be left to the coder/user to guess which of many possible
problems actually ocurred (which can be from opening the file, parsing
it, malloc() failure, ...)


Home | Main Index | Thread Index | Old Index