Skip to Content
함수형 프로그래밍 with 자바
book

함수형 프로그래밍 with 자바

by 벤 바이디히, 허귀영
March 2024
Beginner to intermediate
528 pages
10h 48m
Korean
Hanbit Media, Inc.
Content preview from 함수형 프로그래밍 with 자바
353
CHAPTER 10
함수형 예외 처리
10.110.1
자바 예외 처리 핵심 요약 자바 예외 처리 핵심 요약
일반적으로 예외는 프로그램이 실행되는 동안 일반적인 명령의 흐름을 방해하는 특별한 사
건을 말합니다. 이 개념은 자바뿐만 아니라 다양한 프로그래밍 언어에서도 찾아볼 수 있으
며, 그 역사는 리스프
lisp
1
에 기원을 두고 있습니다.
10.210.2
trytry
--
catchcatch
블록 블록
자바의
try
-
catch
블록은 자바의 핵심 메커니즘 중 하나입니다.
try
{
return doCalculation
(
input
);
}
catch
(
ArithmeticException e
)
{
this
.
log
.
error
("
Calculation failed
",
e
);
return null
;
}
이 개념은 처음 등장한 이후로 조금씩 발전해왔습니다. 여러 개의
catch
블록을 사용해야 할
필요 없이,
|
(파이프 ) 기호를 사용하여
multi
-
catch
블록
2
에서 여러 예외를 한 번에 처리할
수 있게 되었습니다.
try
{
return doCalculation
(
input
);
}
catch
(
ArithmeticException
|
IllegalArgumentException e
)
{
this
.
log
.
error
("
Calculation failed
",
e
);
return null ...
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.
Start your free trial

You might also like

실무로 통하는 클린 코드

실무로 통하는 클린 코드

막시밀리아노 콘티에리

Publisher Resources

ISBN: 9791169212175