Improve assert+imporve error messages when adding comps

This commit is contained in:
bloeys
2022-12-06 06:17:25 +04:00
parent b025afe1b4
commit 855cbfaba3
4 changed files with 6 additions and 12 deletions

View File

@ -1,8 +1,6 @@
package assert
import (
"fmt"
"github.com/bloeys/nmage/consts"
"github.com/bloeys/nmage/logging"
)
@ -10,6 +8,6 @@ import (
func T(check bool, msg string, args ...any) {
if consts.Debug && !check {
logging.ErrLog.Panicln("Assert failed:", fmt.Sprintf(msg, args...))
logging.ErrLog.Panicf("Assert failed: "+msg, args...)
}
}