-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Make error outputs more detail to show pg_dump errors #30
Conversation
adapter/postgres/postgres.go
Outdated
if err != nil { | ||
return "", err | ||
return "", fmt.Errorf("%s :\n\n %s\n", err, out) |
There was a problem hiding this 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:
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
There was a problem hiding this comment.
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!
There was a problem hiding this 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
#29
before
after