Skip to content

try catch finally #202

Description

@teazean

文档: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling#The_finally_block

The finally block contains statements to execute after the try and catch blocks execute but before the statements following the try...catch statement.

总结就是:『finally中的代码』总会执行,无视 try/catch 里面的任何 throw error&return,『finally中的代码』执行时机是先于任何『next/outer的语句』。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions