BE_GetLastError

BE_GetLastError

 

Returns the last error generated by the plugin. Each of the libraries we use have their own error codes. Not currently applicable in all situtations.

In the case of the http functions we're using the curl libraries. You can try looking here : http://curl.haxx.se/libcurl/c/libcurl-errors.html

 

Version : 1.2

Version : 2.0 : changed the way this works so that successive calls to the BE_GetLastError function don't reset the value that is returned, it's only reset when performing any other function call.

 

Result : the code or text of the last error generated by a function call.

Have more questions? Submit a request

5 Comments

  • 0
    Avatar
    Ernest Koe

    it would be awesome if we knew what libraries were throwing what error codes

  • 0
    Avatar
    david

    Or at least what library a given error code is coming from. BE_GetLastLibrary?

  • 0
    Avatar
    Nicholas Orr

    It's actually possible and not too difficult to add the ability to return the error library.  But ... a library often uses other libraries and then also possibly gets errors back from FileMaker itself.

    So the actual library the error comes from might not be what we return, and there's no way to know specifically.  So there'd be some false positives in there.

    I like the idea, but I'm reluctant to add things that are sometimes inaccurate.

    For HTTP calls, it's obvious, where else would you want it where it might help?

    Cheers,

    Nick

  • 0
    Avatar
    david

    Would it be possible (not too difficult) to return a list of all libraries the last function call uses?

    In general, for this kind of function, I would say that getting false positives is OK, as long as that's documented. It would in any case be a big help compared to the what we have at present.

  • 0
    Avatar
    Nicholas Orr

    No, it's not possible to know that.  We pass a request off to a library, the actual code paths that the request takes and what dependencies it has we no longer have any access to.

    Really the plugin is just a link between FileMaker and the core libraries and both ends are black boxes where we can't control much.  The libraries can be debugged as we have the code, but once they're compiled we can only get what they tell us, which isn't much :)

    Cheers,

    Nick

Article is closed for comments.