combine two try-catch block into one, make it cleaner.
Merge pull request #102 from ccliangbo/waitNewUrl

combine two try-catch block into one, make it cleaner.