Update more code to new formatting machinery

This commit is contained in:
Lucien Greathouse
2019-11-18 15:18:06 -08:00
parent af866f0665
commit 0c7a94c062
5 changed files with 22 additions and 18 deletions

View File

@@ -1,16 +1,18 @@
local Fmt = require(script.Parent.Parent.Fmt)
local Config = require(script.Parent.Config)
local invariant
if Config.isDevBuild then
function invariant(message, ...)
message = string.format(message, ...)
message = Fmt.fmt(message, ...)
error("Invariant violation: " .. message, 2)
end
else
function invariant(message, ...)
message = string.format(message, ...)
message = Fmt.fmt(message, ...)
local fullMessage = string.format(
"Rojo detected an invariant violation within itself:\n" ..