Lightroom SDK: photo:setRawMetadata - add "no throw" parameter.

  • 2
  • Idea
  • Updated 6 years ago
Presently, LrTasks.pcall can not be used to trap errors in set-raw-metadata method.

I assume it's because the function itself just stores the value to be set, then the error occurs later, upon commital or something.

In any case, sometimes it is being called with computed names (keys), so error trapping is desirable.

PS - LrTasks.pcall will trap an error in getRawMetadata method, it's just the "set" method at issue.

Rob
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 384 Reply Likes

Posted 6 years ago

  • 2
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 384 Reply Likes
Workaround: explicitly check names and value types as per api documentation.

Workaround is actually OK as long as documentation is:
A. Complete.
B. Correct.
(yes - worrisome to me too...)

R