[번역]Part1 10.1 오류 다시 던지기 추가된 영문 번역#803
Merged
Violet-Bora-Lee merged 1 commit intojavascript-tutorial:masterfrom Jan 3, 2021
Merged
[번역]Part1 10.1 오류 다시 던지기 추가된 영문 번역#803Violet-Bora-Lee merged 1 commit intojavascript-tutorial:masterfrom
Violet-Bora-Lee merged 1 commit intojavascript-tutorial:masterfrom
Conversation
Contributor
Author
|
기존 Pull Request는 닫고 새로 Pull Request 하였습니다^^ |
Violet-Bora-Lee
requested changes
Sep 19, 2020
Member
Violet-Bora-Lee
left a comment
There was a problem hiding this comment.
수정부탁드립니다.
그리고 커밋은 하나로 합쳐주세요.
| 위에선 '불완전한 데이터'를 다루려는 목적으로 `try..catch`를 썼습니다. 그런데 `catch`는 원래 `try` 블록에서 발생한 *모든* 에러를 잡으려는 목적으로 만들어졌습니다. 그런데 위 예시에서 `catch`는 예상치 못한 에러를 잡아내 주긴 했지만, 에러 종류와 관계없이 `"JSON Error"` 메시지를 보여줍니다. 이렇게 에러 종류와 관계없이 동일한 방식으로 에러를 처리하는 것은 디버깅을 어렵게 만들기 때문에 좋지 않습니다. | ||
|
|
||
| To avoid such problems, we can employ the "rethrowing" technique. The rule is simple: | ||
| 이런 문제를 피하고자, '다시 던지기(rethrowing)' 기술을 사용합니다. 규칙은 간단합니다. |
Member
There was a problem hiding this comment.
| **catch는 알고 있는 에러만 처리하고 나머지는 '다시 던져야' 합니다.** | ||
|
|
||
| The "rethrowing" technique can be explained in more detail as: | ||
| '다시 던지기(rethrowing)' 기술을 더 자세히 설명하겠습니다. |
Member
There was a problem hiding this comment.
다시던지기를 위에서 한영병기처리했으니까 여기서는 한글만 써주세요
| ``` | ||
|
|
||
| We can also get the error class name from `err.name` property. All native errors have it. Another option is to read `err.constructor.name`. | ||
| `err.name` 프로퍼티로 에러 클래스 이름을 알 수도 있습니다. 기본형 에러는 모두 이 프로퍼티를 가집니다. 또는 `err.constructor.name`를 사용할 수도 있습니다. |
Member
There was a problem hiding this comment.
|
Please make the requested changes. After it, add a comment "/done". |
46da022 to
00fb5ff
Compare
Contributor
Author
|
/done 수정하고 커밋 하나로 합쳤습니다. |
Member
|
감사합니다. 머지 진행하겠습니다 :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request 체크리스트
TODO