Skip to content

[번역]Part1 10.1 오류 다시 던지기 추가된 영문 번역#803

Merged
Violet-Bora-Lee merged 1 commit intojavascript-tutorial:masterfrom
kbpark:maintenance
Jan 3, 2021
Merged

[번역]Part1 10.1 오류 다시 던지기 추가된 영문 번역#803
Violet-Bora-Lee merged 1 commit intojavascript-tutorial:masterfrom
kbpark:maintenance

Conversation

@kbpark
Copy link
Contributor

@kbpark kbpark commented Aug 30, 2020

Pull Request 체크리스트

TODO

  • 번역 규칙을 확인하셨나요?
    • 줄 바꿈과 단락을 '원문과 동일하게' 유지하셨나요?
    • 맞춤법 검사기로 맞춤법을 확인하셨나요?
    • 마크다운 문법에 사용되는 공백(스페이스), 큰따옴표("), 작은따옴표('), 대시(-), 백틱(`) 등의 특수문자는 그대로 두셨나요?
  • 로컬 서버 세팅 후 최종 결과물을 확인해 보셨나요?
  • PR 하나엔 번역문 하나만 넣으셨나요?
  • 의미 있는 커밋 메시지를 작성하셨나요?
    • 예시
      • [프락시] 번역
      • [프락시] 과제 번역
      • [if문과 조건부 연산자 '?'] 리뷰
      • [주석] 2차 리뷰
      • [Date 객체와 날짜] 번역

@kbpark
Copy link
Contributor Author

kbpark commented Aug 30, 2020

기존 Pull Request는 닫고 새로 Pull Request 하였습니다^^

Copy link
Member

@Violet-Bora-Lee Violet-Bora-Lee left a comment

Choose a reason for hiding this comment

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

수정부탁드립니다.
그리고 커밋은 하나로 합쳐주세요.

위에선 '불완전한 데이터'를 다루려는 목적으로 `try..catch`를 썼습니다. 그런데 `catch`는 원래 `try` 블록에서 발생한 *모든* 에러를 잡으려는 목적으로 만들어졌습니다. 그런데 위 예시에서 `catch`는 예상치 못한 에러를 잡아내 주긴 했지만, 에러 종류와 관계없이 `"JSON Error"` 메시지를 보여줍니다. 이렇게 에러 종류와 관계없이 동일한 방식으로 에러를 처리하는 것은 디버깅을 어렵게 만들기 때문에 좋지 않습니다.

To avoid such problems, we can employ the "rethrowing" technique. The rule is simple:
이런 문제를 피하고자, '다시 던지기(rethrowing)' 기술을 사용합니다. 규칙은 간단합니다.
Copy link
Member

Choose a reason for hiding this comment

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

**catch는 알고 있는 에러만 처리하고 나머지는 '다시 던져야' 합니다.**

The "rethrowing" technique can be explained in more detail as:
'다시 던지기(rethrowing)' 기술을 더 자세히 설명하겠습니다.
Copy link
Member

Choose a reason for hiding this comment

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

다시던지기를 위에서 한영병기처리했으니까 여기서는 한글만 써주세요

```

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`를 사용할 수도 있습니다.
Copy link
Member

Choose a reason for hiding this comment

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

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@kbpark kbpark force-pushed the maintenance branch 2 times, most recently from 46da022 to 00fb5ff Compare September 19, 2020 18:02
@kbpark
Copy link
Contributor Author

kbpark commented Sep 19, 2020

/done

수정하고 커밋 하나로 합쳤습니다.

@Violet-Bora-Lee
Copy link
Member

감사합니다. 머지 진행하겠습니다 :)

@Violet-Bora-Lee Violet-Bora-Lee merged commit 93b2aa1 into javascript-tutorial:master Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants