How to use the falcor.Observable.throw function in falcor

To help you get started, we’ve selected a few falcor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Netflix / falcor-router / src / operations / _PrecedenceProcessor.js View on Github external
matchedPaths.forEach(function(path) {
            try {
                var obs = matched.action.call(context, matchVirtualPathFormat(path, matched.virtualRunner), valueObject);
                results[results.length] = {
                    obs: obs,
                    path: path
                };
            } catch (e) {
                results[results.length] = {
                    obs: Observable.throw({message: e, $type: 'error'}),
                    path: path
                };
            }
        });
    }