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

Make error outputs more detail to show pg_dump errors #30

Merged
merged 3 commits into from
Aug 15, 2019

Conversation

sonken625
Copy link
Contributor

#29

before

2019/08/14 17:28:33 Error on DumpDDLs: exit status 1

after

2019/08/14 17:28:33 Error on DumpDDLs: exit status 1 :
  pg_dump: server version: 10.1; pg_dump version: 9.6.15
pg_dump: aborting because of server version mismatch

if err != nil {
return "", err
return "", fmt.Errorf("%s :\n\n %s\n", err, out)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about:

Suggested change
return "", fmt.Errorf("%s :\n\n %s\n", err, out)
return "", fmt.Errorf("%s :\n\n%s\n", err, out)

When out is multi-line, I think it's more natural:

2019/08/14 17:28:33 Error on DumpDDLs: exit status 1 :
pg_dump: server version: 10.1; pg_dump version: 9.6.15
pg_dump: aborting because of server version mismatch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems better!
Thank you!

Copy link
Contributor Author

@sonken625 sonken625 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about?
I am stating to think that it doesn't need two new line code.
before

2019/08/15 01:37:22 Error on DumpDDLs: exit status 1  :

pg_dump: server version: 10.1; pg_dump version: 9.6.15
pg_dump: aborting because of server version mismatch

after

2019/08/15 01:37:22 Error on DumpDDLs: exit status 1  :
pg_dump: server version: 10.1; pg_dump version: 9.6.15
pg_dump: aborting because of server version mismatch

Copy link
Collaborator

@k0kubun k0kubun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants