Skip to content

ambiguous paragraphs on Custom errors chapter #1808

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

Closed
Violet-Bora-Lee opened this issue Mar 22, 2020 · 2 comments
Closed

ambiguous paragraphs on Custom errors chapter #1808

Violet-Bora-Lee opened this issue Mar 22, 2020 · 2 comments

Comments

@Violet-Bora-Lee
Copy link
Member

Hi.

I'm translating https://javascript.info/custom-errors.

I've tried to understand below two paragraphs but I couldn't.

I think my English reading skills might be not that good to understand sentences yet.

Could you elaborate more especially the first paragraph?

Often the answer is “No”: the outer code wants to be “one level above all that”, it just wants to have some kind of “data reading error” – why exactly it happened is often irrelevant (the error message describes it). Or, even better, it could have a way to get the error details, but only if we need to.

So let’s make a new class ReadError to represent such errors. If an error occurs inside readUser, we’ll catch it there and generate ReadError. We’ll also keep the reference to the original error in its cause property. Then the outer code will only have to check for ReadError.

Q1. What is outer code on "the outer code wants to be"? Outer of what?
Q2. What THAT means on "one level above all that"?
Q3. Does IT mean outer code on "it just wants to have..."?
Q4. What IT means on "why exactly it happened..."?

@iliakan
Copy link
Member

iliakan commented Mar 22, 2020

I'll think how to rephrase that better. Glad to see you're all right these sick times.

@Violet-Bora-Lee
Copy link
Member Author

I'm also glad to see your comment.
Here, the Republic of Korea is relatively safe.
Let's be careful!

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

No branches or pull requests

2 participants