Skip to content

Conversation

@RajeshGogo
Copy link

Updated to ES6
Added try catch
Modified Region tag
Modified comments

Copy link
Member

@sqrrrl sqrrrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor changes, otherwise looks good.

@sqrrrl sqrrrl mentioned this pull request Dec 6, 2021
}
}
catch(err){
Logger.log(err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not critical, but here and elsewhere where catching exceptions for illustrative purposes to include a comment indicating two things:

  • The developer should likely modify the code
  • What is potentially failing

This is particularly important if the try block covers a large section of code as it's not always obvious where the failure might come from. Doesn't have to be a lengthy explanation, can be as short as "// TODO(developer) - Handle files.list() exceptions here"

@sqrrrl sqrrrl merged commit 610b7e6 into googleworkspace:master Dec 15, 2021
brentchang pushed a commit to brentchang/apps-script-samples that referenced this pull request Dec 3, 2023

Co-authored-by: Priyankarp24 <savat@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants