diff --git a/util.go b/util.go index 64fda9f..7d69f3c 100644 --- a/util.go +++ b/util.go @@ -7,8 +7,11 @@ import ( "strings" ) -func check(e error) { +func check(e error, optMsg ...string) { if e != nil { + if (len(optMsg) > 0) { + ExitFail("%s - %s", e, strings.Join(optMsg, " ")) + } ExitFail("%s", e) } }