Skip to main content
Known Participant
February 17, 2009
Question

Error handling strategy

  • February 17, 2009
  • 3 replies
  • 816 views
It seems that many functions in the SDK have underdocumented return codes in error situations. For example, take LrFileUtils.createAllDirectories(). The documentation says:

Return value: (Boolean) True if any parent directory was created; false if all parents already existed.

Ok, possibly useful info, but is there a value that says whether the directory creation itself succeeded or failed? I've pored over the doc and by now I don't think I've missed anything. There are plenty of other functions that don't seem clear in that regard. How are other developers doing error handling?
This topic has been closed for replies.

3 replies

escouten
Adobe Employee
Adobe Employee
February 19, 2009
I meant that there isn't detailed error reporting in LrFiltUtils.
Known Participant
February 18, 2009
Eric, good point. Although I only threw out that one function as an example. If I want something robust right now, it seems I'll want to write wrapper functions for many APIs that do this. For instance, copy() and move() as well.

You say "in the meantime". Can you clarify: does that mean that the APIs actually don't return error codes/messages or that they do but simply aren't documented completely?
escouten
Adobe Employee
Adobe Employee
February 17, 2009
Good point. In the meantime, you could check the existence of the directory via LrFileUtils.exists.