Skip to main content
Glama

mcp-appstore

by appreply-co
tryCatch.js1.3 kB
var _arity = require('./internal/_arity'); var _concat = require('./internal/_concat'); var _curry2 = require('./internal/_curry2'); /** * `tryCatch` takes two functions, a `tryer` and a `catcher`. The returned * function evaluates the `tryer`; if it does not throw, it simply returns the * result. If the `tryer` *does* throw, the returned function evaluates the * `catcher` function and returns its result. Note that for effective * composition with this function, both the `tryer` and `catcher` functions * must return the same type of results. * * @func * @memberOf R * @since v0.20.0 * @category Function * @sig (...x -> a) -> ((e, ...x) -> a) -> (...x -> a) * @param {Function} tryer The function that may throw. * @param {Function} catcher The function that will be evaluated if `tryer` throws. * @return {Function} A new function that will catch exceptions and send then to the catcher. * @example * * R.tryCatch(R.prop('x'), R.F, {x: true}); //=> true * R.tryCatch(R.prop('x'), R.F, null); //=> false */ module.exports = _curry2(function _tryCatch(tryer, catcher) { return _arity(tryer.length, function() { try { return tryer.apply(this, arguments); } catch (e) { return catcher.apply(this, _concat([e], arguments)); } }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/appreply-co/mcp-appstore'

If you have feedback or need assistance with the MCP directory API, please join our Discord server