Lightroom SDK: withPrivateWriteAccessDo - allow optional name parameter

  • 1
  • Idea
  • Updated 7 years ago
Presently, there is a name required for withWriteAccessDo method.

This is good, because if a catalog access method fails when the catalog is already being accessed, the error message shows the "culprit".

I acknowledge that the original purpose for the name was the undo, and private metadata is not included in undo, but it would be useful for debugging if private access contention could "name the culprit" too.

Example:

[5516] L:
[5516] LrCatalog:withWriteAccessDo: already inside a withWriteAccessDo() wrapper performing action "Create Change Collection"
[5516] 0: global error - C
[5516] 1: upvalue ? - 1666282269:927+54
[5516] 2: [unnamed] - 1666282269:1135+15
[5516] 3: [unnamed] - 179812414:2146+12
[5516] ---------------------------------
[5516]
[5516] L:
[5516] LrCatalog:withWriteAccessDo: already inside a withWriteAccessDo() wrapper performing action "Create plugin collection set"
[5516] 0: global error - C
[5516] 1: upvalue ? - 1666282269:927+54
[5516] 2: [unnamed] - 1666282269:1135+15
[5516] 3: [unnamed] - 179812414:2146+12
[5516] ---------------------------------
[5516]
[5516] L:
[5516] LrCatalog:withPrivateWriteAccessDo: already inside a withPrivateWriteAccessDo() wrapper performing action "(unknown)"
[5516] 0: global error - C
[5516] 1: upvalue ? - 1666282269:927+54
[5516] 2: [unnamed] - 1666282269:1111+4
[5516] 3: [unnamed] - 179812414:2146+12
[5516] ---------------------------------
[5516]
[5516] L:
[5516] LrCatalog:withPrivateWriteAccessDo: already inside a withPrivateWriteAccessDo() wrapper performing action "(unknown)"
[5516] 0: global error - C
[5516] 1: upvalue ? - 1666282269:927+54
[5516] 2: [unnamed] - 1666282269:1111+4
[5516] 3: [unnamed] - 179812414:2146+12
[5516] ---------------------------------
[5516]
[5516] L:
[5516] LrCatalog:withPrivateWriteAccessDo: already inside a withPrivateWriteAccessDo() wrapper performing action "(unknown)"
[5516] 0: global error - C
[5516] 1: upvalue ? - 1666282269:927+54
[5516] 2: [unnamed] - 1666282269:1111+4
[5516] 3: [unnamed] - 179812414:2146+12
[5516] ---------------------------------
[5516]
[5516] L:
[5516] LrCatalog:withWriteAccessDo: already inside a withPrivateWriteAccessDo() wrapper performing action "(unknown)"
[5516] 0: global error - C
[5516] 1: upvalue ? - 1666282269:927+54
[5516] 2: [unnamed] - 1666282269:1135+15
[5516] 3: [unnamed] - 179812414:2146+12
[5516] ---------------------------------
[5516]
[5516] L:
[5516] LrCatalog:withPrivateWriteAccessDo: already inside a withPrivateWriteAccessDo() wrapper performing action "(unknown)"
[5516] 0: global error - C
[5516] 1: upvalue ? - 1666282269:927+54
[5516] 2: [unnamed] - 1666282269:1111+4
[5516] 3: [unnamed] - 179812414:2146+12
[5516] ---------------------------------
[5516]

As you can see, one can tell what the competition is when its a withWriteAccessDo caller, but withPrivateWriteAccessDo'ers remain anonymous.
(PS - this is typical catalog contention during startup, when there are multiple plugins vying for the catalog)

If its not too much trouble...

Thanks for considering,
Rob
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes

Posted 7 years ago

  • 1

Be the first to post a reply!