Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Dec 21, 2019
Merged

Conversation

nayeemrmn
Copy link
Collaborator

@nayeemrmn nayeemrmn commented Dec 20, 2019

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

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

@ry ry left a comment

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

Copy link
Member

@ry ry left a comment

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.

None yet

2 participants