                 err = "misc.defaults -- TypeError: property '#{prop}' must be specified: #{error()}"
                 console.log(err)
                 console.trace()
-                throw err
+                if DEBUG
+                    throw err
             r[prop] = obj1[prop]
         else if obj2[prop]?  # only record not undefined properties
             if obj2[prop] == exports.defaults.required
                 err = "misc.defaults -- TypeError: property '#{prop}' must be specified: #{error()}"
                 console.log(err)
                 console.trace()
-                throw err
+                if DEBUG
+                    throw err
             else
                 r[prop] = obj2[prop]
     if not allow_extra

                err = "misc.defaults -- TypeError: got an unexpected argument '#{prop}' #{error()}"
                console.log(err)
                console.trace()
                throw err
    return r

# WARNING -- don't accidentally use this as a default:

# obj1.  For each property P of obj2 not specified in obj1, the
# corresponding value obj1[P] is set (all in a new copy of obj1) to
# be obj2[P].
DEBUG = false
exports.defaults = (obj1, obj2, allow_extra) ->
    if not obj1?
        obj1 = {}
