errors icon indicating copy to clipboard operation
errors copied to clipboard

Error() method in withMessage is inappropriate

Open ZipFast opened this issue 3 years ago • 0 comments

Current Error() method will print the log message first then with the error rfc code, it may be better to print the error rfc code in front of log message.

func (w *withMessage) Error() string  { return w.msg + ": " + w.cause.Error() }

In the case of BR

Error: backup meta file exists in file:////tmp/backup_test/backupmeta, there may be some backup files in the path already, please specify a correct backup directory!: [BR:Common:ErrInvalidArgument]invalid argument

Place [BR:Common:ErrInvalidArgument]invalid argument fieild in front of log message will be better.

ZipFast avatar Jun 18 '21 09:06 ZipFast