bricks-cloud / vscode

The VS Code extension of Bricks, meant to be used with the main Bricks repository.
https://bricks-tech.com/
Apache License 2.0
0 stars 0 forks source link

Catch error in code-generation event #14

Closed donfour closed 1 year ago

donfour commented 1 year ago

Summary

Currently when there's an error, VS Code crashes without telling Figma, which leaves Figma stuck in the loading page. This PR adds a try-catch block around the code-generation logic and sends the error stack to Figma when there's an error.

How did you test this change?

Added a throw new Error("some value") in the try block to simulate an error. Tested that Figma is able to get the error.