Skip to content

Error() method in withMessage is inappropriate #37

Description

@ZipFast

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions