adobe-photoshop / generator-core

Core Node.js library for Adobe Photoshop CC's Generator extensibility layer
MIT License
692 stars 97 forks source link

Better logging of JSX errors, suppress getDocumentInfo error when no documents are open #411

Closed mcilroyc closed 5 years ago

mcilroyc commented 5 years ago
  1. It is sometimes hard to tell via the generator logs which JSX script failed. The first commit adds an explicit log warning
  2. If generator-assets polls for document info when no documents are open, the JSX script throws. This is already handled gracefully, but it adds meaningless clutter in the logs. This is even worse now with the logging added in this PR, so the second commit changes the JSX to return "null" in this particular case.