ECMA-262 13.15 The try statement
515413
function parseCatchClause() {
        var param, params = [], paramMap = {}, key, i, body, node = new Node();

        expectKeyword('catch');

        expect('(');
        if (match(')')) {
            throwUnexpectedToken(lookahead);
        }

        param = parsePattern(params);
        for (i = 0; i < params.length; i++) {
            key = '$' + params[i].value;
            if (Object.prototype.hasOwnProperty.call(paramMap, key)) {
                tolerateError(Messages.DuplicateBinding, params[i].value);
            }
            paramMap[key] = true;
        }

        // ECMA-262 12.14.1
        if (strict && isRestrictedWord(param.name)) {
            tolerateError(Messages.StrictCatchVariable);
        }

        expect(')');
        body = parseBlock();
        return node.finishCatchClause(param, body);
    }
662363
private function _try() {
    $node = new TryCatchNode();
    $this->mustMatch(T_TRY, $node);
    $node->addChild($this->innerStatementBlock(), 'try');
    $catch_node = new CatchNode();
    while ($this->tryMatch(T_CATCH, $catch_node)) {
      $this->mustMatch('(', $catch_node, 'openParen');
      $catch_node->addChild($this->name(), 'exceptionType');
      $this->mustMatch(T_VARIABLE, $catch_node, 'variable');
      $this->mustMatch(')', $catch_node, 'closeParen', FALSE, TRUE);
      $catch_node->addChild($this->innerStatementBlock(), 'body');
      $node->addChild($catch_node);
      $catch_node = new CatchNode();
    }
    if ($this->tryMatch(T_FINALLY, $node)) {
      $node->addChild($this->innerStatementBlock(), 'finally');
    }
    return $node;
  }
192256
private static boolean mySqlErrorCodeMatches(Exception e, int errorCode)
    {
        return Throwables.getCausalChain(e).stream()
                .filter(SQLException.class::isInstance)
                .map(SQLException.class::cast)
                .filter(t -> t.getErrorCode() == errorCode)
                .map(Throwable::getStackTrace)
                .anyMatch(isMySQLException());
    }
1305842
function trycatchit(tryFn, that, args) {
  try {
    // Avoid slow apply for common use
    switch(args ? args.length : 0) {
    case 0:
      tryFn.call(that)
      break
    case 1:
      tryFn.call(that, args[0])
      break
    case 2:
      tryFn.call(that, args[0], args[1])
      break
    case 3:
      tryFn.call(that, args[0], args[1], args[2])
      break
    case 4:
      tryFn.call(that, args[0], args[1], args[2], args[3])
      break
    case 5:
      tryFn.call(that, args[0], args[1], args[2], args[3], args[4])
      break
    case 6:
      tryFn.call(that, args[0], args[1], args[2], args[3], args[4], args[5])
      break
    case 7:
      tryFn.call(that, args[0], args[1], args[2], args[3], args[4], args[5], args[6])
      break
    case 8:
      tryFn.call(that, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7])
      break
    case 9:
      tryFn.call(that, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8])
      break
    default:
      tryFn.apply(that, args)
    }
  } catch(err) {
    return err
  }
}
222132
function tryConnect() {
    if (!seleniumIP) {
        process.nextTick(buildDriver);
        return;
    }
    const sock = net.connect({
        host: seleniumIP,
        port: +seleniumPort,
    });
    sock.on("connect", function() {
        sock.end();
        attempts = 0;
        process.nextTick(buildDriver);
    }).on("error", function() {
        if (++attempts > 50) {
            throw new Error("Failed to connect selenium server.");
        }
        setTimeout(tryConnect, 200);
    });
}
1205098
function _try() {
            // Call function

            Q.invoke(f)
            .then(function(result) {
                // Success
                d.resolve(result);
            }, function(err) {
                // Failure

                // Decrement
                remainingTries -= 1;

                // No tries left, so reject promise with last error
                if(remainingTries >= 0 && canContinue(err, N - remainingTries)) {
                    // We have some retries left, so retryTimeout
                    if(retryTimeout) {
                        setTimeout(_try, retryTimeout);
                    } else {
                        _try();
                    }
                } else {
                    // Total failure
                    d.reject(err);
                    return;
                }
            }).done();
        }
527801
function tryRequire (regexp) {
  const nodeModulesDir = getNodeModulesDir()
  const results = []

  debug(`arguments.regexp: ${regexp || 'undefined'}`)

  if (!regexp || !fs.existsSync(nodeModulesDir)) {
    debug('regexp is undefined or nodeModulesDir not exists')
    return results
  }

  const moduleList = getModulesByDir(nodeModulesDir)
    .filter(m => regexp.test(m))

  debug(`matched modules: ${moduleList.join(', ')}`)

  return moduleList
}
645606
function error () {
  if (mocking) {
    cli.stderr += stripAnsi(concatArguments(arguments) + '\n')
  } else {
    console.error.apply(null, arguments)
  }
}
740621
function _checkResult(type, err, obj, options)
{
    if (options) {
        if (options.logger) logger.logger(options.logger, 'parse:', type, options, lib.traceError(err), obj);
        if (options.datatype == "object" || options.datatype == "obj") return {};
        if (options.datatype == "list") return [];
        if (options.datatype == "str") return "";
    }
    return null;
}
951287
private Status executeFail(Stmt.Fail stmt, CallStack frame, EnclosingScope scope) {
		throw new AssertionError("Runtime fault occurred");
	}
920820
function throwCoerceError (val, errorMessage) {
	if (!errorMessage) return;
	errorMessage = ('' + errorMessage).replace(/\%type/gi, type(val));
	throw new LuaError(errorMessage);
}
1120374
function attemptCallback(filePath, callback, attempts) {

	try {

		callback();
		return;

	} catch (error) {

		if (attempts === 0) {
			console.error('takeown: callback failed - exceeded attempts');
			throw error;
		}

		switch (error.code) {

			case 'EPERM':
			case 'EACCES':
			case 'EBUSY':
			case 'ENOTEMPTY':
				return attemptCallback(filePath, callback, --attempts);

			default:
				throw error;
		}
	}
}
235136
function tryFile(requestPath, isMain) {
        const rc = stat(requestPath);
        if (preserveSymlinks && !isMain) {
            return rc === 0 && path.resolve(requestPath);
        }
        return rc === 0 && fs.realpathSync(requestPath);
    }
1294739
function tryCatchReject(f, x, thisArg, next) {
			try {
				next.become(getHandler(f.call(thisArg, x)));
			} catch(e) {
				next.become(new Rejected(e));
			}
		}
542347
function tryCatchReject3(f, x, y, thisArg, next) {
			try {
				f.call(thisArg, x, y, next);
			} catch(e) {
				next.become(new Rejected(e));
			}
		}
1160738
function EnvAlreadyExistsError (e) {

    e = e || {};

    var environmentName = e.environmentName || '';

    this.message = 'Environment "' + environmentName + '" already exists';

    this.code = ERR_ENVIRONMENT_ALREADY_EXISTS;
    this.environmentName = environmentName;

}
1356877
function executeEach(arr, fun) {
    var i = -1;
    while (++i < arr.length) {
      if (arr[i]) {
        fun(arr[i]);
      }
    }
  }