function getThrowContext(state) {
	let context = state.tryContext;

	while (context) {
		if (
			context.position === "try" ||
			(context.hasFinalizer && context.position === "catch")
		) {
			return context;
		}
		context = context.upper;
	}

	return state;
}
Gets a context for a `throw` statement. There is just one special case:
if there is a `try` statement with a `finally` block and we are inside of
a `catch` because that changes how `throw` behaves; otherwise, this just
passes through the given state.
@param {CodePathState} state The state to search within.
@returns {TryContext|CodePathState} A context for a `throw` statement.