@@ -23,7 +23,7 @@ template class _template_::weak<boxed>;
2323template class _template_::recur<boxed>;
2424
2525boxed::boxed(const long n) : _int_(static_cast<int>(n)) {
26−#if !defined(NDEBUG)
26+#if !defined(NDEBUG) && !defined(PURESCRIPT_DISABLE_EXCEPTIONS)
2727 if (n < std::numeric_limits<int>::min() || n > std::numeric_limits<int>::max()) {
2828 throw std::runtime_error("integer out of range");
2929 }
@@ -31,7 +31,7 @@ boxed::boxed(const long n) : _int_(static_cast<int>(n)) {
3131}
3232
3333boxed::boxed(const unsigned long n) : _int_(static_cast<int>(n)) {
34−#if !defined(NDEBUG)
34+#if !defined(NDEBUG) && !defined(PURESCRIPT_DISABLE_EXCEPTIONS)
3535 if (n > std::numeric_limits<int>::max()) {
3636 throw std::runtime_error("integer out of range");
3737 }