Skip to Content
훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우
book

훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우

by 최원재, 강전희, 안재덕, 남윤화, 피트 구들리프
May 2016
Beginner to intermediate
438 pages
8h 46m
Korean
Hanbit Media, Inc.
Content preview from 훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우
105
8
장
오류 무시하지 않기
예를 들어 다중 스레드에서 동일한 함수를 호출하면 어떻게 될까?
3
간혹 다른 경로의 채널이나 부작용을 오류 전달을 위해 사용하는 경우가 있다. 예를 들면, ‘성공 상태’
를 확인하기 위해 반드시 다른 함수를 호출해야 하거나, 뭔가 잘못된 경우 어떤 객체가 ‘잘못됨’ 상태
가 되는 걸 본 적이 있을 것이다.
예외
예외는 언어 자체에서 기원하는, 보다 구조적으로 오류를 전달하고 다루는 방법이다. 그러니 결코 무
시하고 넘어갈 수 없다. 하지만 과연 그럴까? 다음과 같은 형태는 자주 찾아볼 수 있다.
try
{
//
...어떤
작동들...
}
catch
(...)
{}
//
오류를
무시한다.
이 같은 끔찍한 구조의 미덕이라곤 도덕적으로 미심쩍은 행위를 하고 있다는 사실을 알려준다는 점뿐
이다.
예외는 완벽하지 않다. 예외를 비난하는 사람들은 그것이 오류 경로를 숨긴다고 불평한다. 예외로 인
해 비정상적 경로로 콜스택을 벗어나 부작용을 일으킬 수 있다는 이유에서다(부작용의 사례로 리소스
누수나 함수의 비정상적 작동 등이 있다). 그러나 앞에서 본 예제에서처럼 예외를 처리한 함수에서는
오류 처리 자체를 하지 않으므로, 이러한 문제가 발생하고 있다는 사실조차 인식할 수 없다.
다른 많은 기술과 마찬가지로, 예외를 효과적으로 사용하기 위해서는 많
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

클라우드 네이티브: 클라우드 네이티브 애플리케이션을 설계, 개발, 운영하는 핵심 가이드

클라우드 네이티브: 클라우드 네이티브 애플리케이션을 설계, 개발, 운영하는 핵심 가이드

정원천, 보리스 숄, 트렌트 스완슨, 피터 야우쇼베츠

Publisher Resources

ISBN: 9788968482304