function evaluateTryStatement({ node, evaluate, environment, reporting, statementTraversalStack }) {
    const executeTry = () => {
        setInLexicalEnvironment({ env: environment, reporting, newBinding: true, node, path: TRY_SYMBOL, value: true });
        // The Block will declare an environment of its own
        evaluate.statement(node.tryBlock, environment);
    };
    const executeCatch = (ex) => {
        clearBindingFromLexicalEnvironment(environment, TRY_SYMBOL);
        // The CatchClause will declare an environment of its own
        evaluate.nodeWithArgument(node.catchClause, environment, ex, statementTraversalStack);
    };
    const executeFinally = () => {
        clearBindingFromLexicalEnvironment(environment, TRY_SYMBOL);
        // The Block will declare an environment of its own
        evaluate.statement(node.finallyBlock, environment);
    };
    // A TryStatement must have either a catch or a finally block
    if (node.catchClause == null && node.finallyBlock == null) {
        throw new MissingCatchOrFinallyAfterTryError({ node });
    }
    // Follows the form: try {...} catch {...}
    else if (node.catchClause != null && node.finallyBlock == null) {
        try {
            executeTry();
        }
        catch (ex) {
            executeCatch(ex);
        }
    }
    // Follows the form: try {...} catch {...} finally {...}
    else if (node.catchClause != null && node.finallyBlock != null) {
        try {
            executeTry();
        }
        catch (ex) {
            executeCatch(ex);
        }
        finally {
            executeFinally();
        }
    }
    // Follows the form: try {...} finally {...}
    else if (node.catchClause == null && node.finallyBlock != null) {
        try {
            executeTry();
        }
        finally {
            executeFinally();
        }
    }
}
/**
 * Evaluates, or attempts to evaluate, a TryStatement
 *
 * @param options
 * @returns
 */
Evaluates, or attempts to evaluate, a TryStatement
@param options
@returns
Evaluates or attempts to evaluate a TryStatement @param options @returns
function evaluateTryStatement({ node, evaluate, environment, reporting, statementTraversalStack }) {
    const executeTry = () => {
        setInLexicalEnvironment({ env: environment, reporting, newBinding: true, node, path: TRY_SYMBOL, value: true });
        evaluate.statement(node.tryBlock, environment);
    };
    const executeCatch = (ex) => {
        clearBindingFromLexicalEnvironment(environment, TRY_SYMBOL);
        evaluate.nodeWithArgument(node.catchClause, environment, ex, statementTraversalStack);
    };
    const executeFinally = () => {
        clearBindingFromLexicalEnvironment(environment, TRY_SYMBOL);
        evaluate.statement(node.finallyBlock, environment);
    };
    if (node.catchClause == null && node.finallyBlock == null) {
        throw new MissingCatchOrFinallyAfterTryError({ node });
    }
    else if (node.catchClause != null && node.finallyBlock == null) {
        try {
            executeTry();
        }
        catch (ex) {
            executeCatch(ex);
        }
    }
     finally {...}
    else if (node.catchClause != null && node.finallyBlock != null) {
        try {
            executeTry();
        }
        catch (ex) {
            executeCatch(ex);
        }
        finally {
            executeFinally();
        }
    }
    else if (node.catchClause == null && node.finallyBlock != null) {
        try {
            executeTry();
        }
        finally {
            executeFinally();
        }
    }
}
function evaluateTryStatement ( { node , evaluate , environment , reporting , statementTraversalStack } ) { const executeTry = ( ) => { setInLexicalEnvironment ( { env : environment , reporting , newBinding : true , node , path : TRY_SYMBOL , value : true } ) ; evaluate . statement ( node . tryBlock , environment ) ; } ; const executeCatch = ( ex ) => { clearBindingFromLexicalEnvironment ( environment , TRY_SYMBOL ) ; evaluate . nodeWithArgument ( node . catchClause , environment , ex , statementTraversalStack ) ; } ; const executeFinally = ( ) => { clearBindingFromLexicalEnvironment ( environment , TRY_SYMBOL ) ; evaluate . statement ( node . finallyBlock , environment ) ; } ; if ( node . catchClause == null && node . finallyBlock == null ) { throw new MissingCatchOrFinallyAfterTryError ( { node } ) ; } else if ( node . catchClause != null && node . finallyBlock == null ) { try { executeTry ( ) ; } catch ( ex ) { executeCatch ( ex ) ; } } else if ( node . catchClause != null && node . finallyBlock != null ) { try { executeTry ( ) ; } catch ( ex ) { executeCatch ( ex ) ; } finally { executeFinally ( ) ; } } else if ( node . catchClause == null && node . finallyBlock != null ) { try { executeTry ( ) ; } finally { executeFinally ( ) ; } } }
Evaluates, or attempts to evaluate, a TryStatement
 @param options
 @returns
Evaluates or attempts to evaluate a TryStatement @param options @returns
// The Block will declare an environment of its own // The CatchClause will declare an environment of its own // The Block will declare an environment of its own // A TryStatement must have either a catch or a finally block // Follows the form: try {...} catch {...} // Follows the form: try {...} catch {...} finally {...} // Follows the form: try {...} finally {...}