         hostname = _.first request.headers.host.split ":"
         pdomain = (pattern) -> pattern.test hostname
         presource = (pattern) -> pattern.test pathname
-        domainOk = _.some(domains, pdomain) or no
+        domainOk = try _.some(domains, pdomain) or no
         resourceOk = _.some(resources, presource) or no
         matches = domainOk is yes and resourceOk is yes
         @emit "matches", matches, request, response

    @resource: (pattern) ->
        assert identify = @identify().underline.toString()
        regexify = (s) -> new RegExp "^#{RegExp.escape(s)}$"
        pattern = regexify pattern if _.isString pattern
        inspected = pattern.unescape()?.underline or pattern
        associate = "Associating #{inspected} resource with %s"
        notRegexp = "The #{inspected} is not a valid regexp"

    @domain: (pattern) ->
        assert identify = @identify().underline.toString()
        regexify = (s) -> new RegExp "^#{RegExp.escape(s)}$"
        pattern = try regexify pattern if _.isString pattern
        inspected = pattern.unescape()?.underline or pattern
        associate = "Associating #{inspected} domain with %s"
        notRegexp = "The #{inspected} is not a valid regexp"
