Refactor overlay script; extract try-catch blocks in to functions to avoid nesting them.
Refactor overlay script; extract try-catch blocks in to functions to avoid nesting them.

atlassian/JSErrorCollector,chrisdarroch/JSErrorCollector,atlassian/JSErrorCollector,chrisdarroch/JSErrorCollector,atlassian/JSErrorCollector,chrisdarroch/JSErrorCollector,chrisdarroch/JSErrorCollector,atlassian/JSErrorCollector