Skip to content

feat: Return null on error in Deno.dir()#3531

Merged
ry merged 3 commits into
denoland:masterfrom
nayeemrmn:dir-fallback
Dec 21, 2019
Merged

feat: Return null on error in Deno.dir()#3531
ry merged 3 commits into
denoland:masterfrom
nayeemrmn:dir-fallback

Conversation

@nayeemrmn

@nayeemrmn nayeemrmn commented Dec 20, 2019

Copy link
Copy Markdown
Contributor

Useful here because it would save a lot of try/catch blocks for what is a common pattern, even if it seems higher order.

Comment thread cli/js/lib.deno_runtime.d.ts Outdated
@nayeemrmn nayeemrmn changed the title feat: Add a fallback parameter to Deno.dir() feat: Return null on error in Deno.dir() Dec 20, 2019

@ry ry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe permission errors should still throw

@ry ry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@ry
ry merged commit b7b0668 into denoland:master Dec 21, 2019
@nayeemrmn
nayeemrmn deleted the dir-fallback branch December 21, 2019 01:03
bartlomieju pushed a commit to bartlomieju/deno that referenced this pull request Dec 28, 2019
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.

2 participants