Sample output:

var pattern = registry.patterns[name];
if (pattern.transform) {
    try {
        pattern.transform($content);
    } catch (e) {
        if (dont_catch) { throw(e); }
        log.error("Transform error for pattern" + name, e);
    }