Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message not showing on preview. (for erd version 0.2.0) #29

Open
adamist521 opened this issue Dec 6, 2019 · 0 comments
Open

Error message not showing on preview. (for erd version 0.2.0) #29

adamist521 opened this issue Dec 6, 2019 · 0 comments

Comments

@adamist521
Copy link

adamist521 commented Dec 6, 2019

What's going on

Error from erd v0.2.0 is not shown in preview (screenshot below).
image

Cause

It is due to that erd outputs error to stderr instead of stdout which assumed to be the old implementation and that causes error messages not shown in preview of VSCode.

Temporaly Solution (&problem)

As a temporaly solution, changing .stdout to .stderr in the following code will output message on preview.
(One thing I have to mention is that changing code would make erd-go v1.4.3 not showing error message so (unless you put both stdout and stderr))

// for Error handing
let erdStdout = '';
erdProcess
.stdout
.on('data', (data) => {
if (data.toString().length > 0) {
erdStdout += data.toString()
}
});

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant