You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Errors thrown by CDK Apps are just printed to stdout/stderr by the subprocess. we should intercept, capture and re-throw the error. Instead this should be thrown by toolkit.synth directly.
We need to pass a magic env variable CDK_SERIALIZE_ERRORS to the cdk app. When this variable is set, then we add the following snippet:
process.on('uncaughtException',function(err){// do magic here, e.g.console.error('Caught exception: '+err);});
This needs to somehow announce to the parent process that the app is no sending a JSON serialized error through the channel.
In the CLI/Toolkit we need to detect this and NOT print regularly. Instead we deserialize the error, recreate it to a proper Node exception and re throw it (toolkit). In the CLI we can also add some nice formatting on the error.
The text was updated successfully, but these errors were encountered:
Errors thrown by CDK Apps are just printed to stdout/stderr by the subprocess. we should intercept, capture and re-throw the error. Instead this should be thrown by
toolkit.synth
directly.We need to pass a magic env variable
CDK_SERIALIZE_ERRORS
to the cdk app. When this variable is set, then we add the following snippet:This needs to somehow announce to the parent process that the app is no sending a JSON serialized error through the channel.
In the CLI/Toolkit we need to detect this and NOT print regularly. Instead we deserialize the error, recreate it to a proper Node exception and re throw it (toolkit). In the CLI we can also add some nice formatting on the error.
The text was updated successfully, but these errors were encountered: