Skip to content

Commit

Permalink
modify error model
Browse files Browse the repository at this point in the history
  • Loading branch information
maidul98 committed Dec 7, 2022
1 parent 8cd9e20 commit 3db1ff2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cli/packages/models/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ import log "github.com/sirupsen/logrus"
// Custom error type so that we can give helpful messages in CLI
type Error struct {
Err error
DebugMessage string
FriendlyMessage string
}

func (e *Error) printFriendlyMessage() {
log.Infoln(e.FriendlyMessage)
}

func (e *Error) printDebuError() {
log.Debugln(e.Err)
}

0 comments on commit 3db1ff2

Please sign in to comment.