#assert in release builds

1 messages · Page 1 of 1 (latest)

real barn
#

I've been using std.debug.assert but I want an assert that doesn't get optimized out of release builds? Or something rather that just throws (returns) an error when the condition is false.

Is there such a thing?

simple mauve
#

if (!ok) return error.UhOh;

real barn
#

i would need to define that error{ UhOh } ?