Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
例外は"投げない"〜Scalableエラー処理入門
Search
YuitoSato
December 22, 2017
Technology
3
1.2k
例外は"投げない"〜Scalableエラー処理入門
https://d-cube.connpass.com/event/74106/
「教養としてのScala ~ そろそろ始めてみたい2017冬」のLTのひとつです。
YuitoSato
December 22, 2017
Tweet
Share
More Decks by YuitoSato
See All by YuitoSato
「規約、知識、オペレーション」から考える中規模以上の開発組織のCursorルールの 考え方・育て方 / Cursor Rules for Coding Styles, Domain Knowledges and Operations
yuitosato
9
6.2k
大AI時代で輝くために今こそドメインにディープダイブしよう / Deep Dive into Domain in AI-Agent-Era
yuitosato
2
2.9k
50人の組織でAIエージェントを使う文化を作るためには / How to Create a Culture of Using AI Agents in a 50-Person Organization
yuitosato
6
7.1k
Railway Oriented Programming を オニオンアーキテクチャに適用する by kotlin-result / Railway Oriented Programming in Onion Architecture by kotlin-result
yuitosato
5
1.4k
リファクタリングへの耐性が高いモデルベースの統合テストの紹介 / Model-Base Integration Test for Refactoring
yuitosato
7
3.6k
Expressing Business Logic with Types: Functional DDD for OOP
yuitosato
1
160
ビジネスロジックを「型」で表現するOOPのための関数型DDD / Functional And Type-Safe DDD for OOP
yuitosato
44
31k
Java21とKotlinの代数的データ型 & パターンマッチの紹介と本当に嬉しい使い方 / Algebraic Data Type in Java and Kotlin: Happy Use of Pattern Match
yuitosato
14
5.5k
ログラスの継続的ライブラリアップデートのWhyとHow / Why and How to Update Libraries Continuously in Loglass
yuitosato
0
510
Other Decks in Technology
See All in Technology
Agent Skillsがハーネスの垣根を超える日
gotalab555
7
4.9k
フィッシュボウルのやり方 / How to do a fishbowl
pauli
2
430
小さく、早く、可能性を多産する。生成AIプロジェクト / prAIrie-dog
visional_engineering_and_design
0
220
AR Guitar: Expanding Guitar Performance from a Live House to Urban Space
ekito_station
0
270
MySQLとPostgreSQLのコレーション / Collation of MySQL and PostgreSQL
tmtms
1
1.4k
[PR] はじめてのデジタルアイデンティティという本を書きました
ritou
0
330
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
2
520
業務の煩悩を祓うAI活用術108選 / AI 108 Usages
smartbank
9
18k
Autonomous Database - Dedicated 技術詳細 / adb-d_technical_detail_jp
oracle4engineer
PRO
5
11k
"人"が頑張るAI駆動開発
yokomachi
1
660
Redshift認可、アップデートでどう変わった?
handy
1
110
AgentCore BrowserとClaude Codeスキルを活用した 『初手AI』を実現する業務自動化AIエージェント基盤
ruzia
7
2.1k
Featured
See All Featured
BBQ
matthewcrist
89
9.9k
What's in a price? How to price your products and services
michaelherold
246
13k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
The SEO identity crisis: Don't let AI make you average
varn
0
40
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
300
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
260
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
69
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
270
Automating Front-end Workflow
addyosmani
1371
200k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Transcript
ETDBMB ྫ֎l͛ͳ͍z d4DBMBCMFΤϥʔॲཧೖd ϏζϦʔνࠤ౻༗ే
ETDBMB ͢ਓ w ৽ଔ w ֶੜͷࠒ3VCZ w ۀͰ4DBMBͱ5ZQF4DSJQU w 4DBMBྺ
ࠤ౻༗ేʢ!:VJJJUPUPʣ
ETDBMB Έͳ͞Μ
ETDBMB ྫ֎
ETDBMB ͛ͯ·͔͢ʁ
ETDBMB ྫ֎
ETDBMB ัͬͯ·͔͢ʁ
ETDBMB ྫ֎Λ͛ͳ͍ Τϥʔॲཧ͋Γ·͢ ͱ͍͏Λ͠·͢
ETDBMB ࠓͷΰʔϧ w 4DBMBͷΤϥʔॲཧΛΔ w ྫ֎Λ͛ΔҎ֎ͷΤϥʔॲཧ͕͋Δ͜ͱΔ
ETDBMB Τϥʔॲཧͷྺ࢙ ͬ͘͟Γ PS/VMM࣌ ྫ֎ॲཧ ΤϥʔʹҙຯΛ͍࣋ͨͤͨ Τϥʔ·ͱΊͯॲཧ͍ͨ͠
ETDBMB ྫ֎ॲཧͱʁ ݺͼग़͠ݩ ϝιου */ Τϥʔʂ $BUDIઅ ίʔϧελοΫΛͨͲΔ 065
ETDBMB ͭΒ͍͜ͱ͋Δ ݺͼग़͠ݩ ϝιου 065 ίʔϧελοΫΛͨͲΔ $BUDIઅ
ETDBMB ੍ޚϑϩʔ͕̎ͭ
ETDBMB ͭΒ͍͜ͱᶄ ݺͼग़͠ݩ ϝιου 065 Τϥʔʂ ίʔϧελοΫΛͨͲΔ ❓❓ */
ETDBMB $BUDI͠ΕΔ
ETDBMB ͭΒ͍͜ͱ·ͱΊ ੍ޚϑϩʔ͕ෳࡶ ΤϥʔॲཧΕ
ETDBMB ͍ͨ͜͠ͱ·ͱΊ ੍ޚϑϩʔΛཧ ΤϥʔॲཧΛڧ੍
ETDBMB ੍ޚϑϩʔΛཧ͢Δʹ ݺͼग़͠ݩ ϝιου &SSPSPS ਖ਼ৗ &SSPSPS ਖ਼ৗ ΤϥʔҰͭͷΦϒδΣΫτͱͯ͠ฦ͢
ETDBMB ͦ͜Ͱ4DBMBͩʂ
ETDBMB ͦ͜Ͱ&JUIFSͩʂ
ETDBMB 4DBMBͷ&JUIFSͱʁ w ̎ͭͷΦϒδΣΫτΛอ࣋Ͱ͖ΔΫϥε w ࣦഊ࣌ -FGU ͷΦϒδΣΫτɺޭ࣌ 3JHIU ͷΦϒδΣΫτΛอ࣋
w ̎ͭಉ࣌อ࣌Ͱ͖ͳ͍ &JUIFS -FGU 3JHIU
ETDBMB ࣮ࡍʹॻ͍ͯΈΑ͏ def signUp(email: String): Either[Error, User] = { If
(email.length < 5) { Left(Error(“Too Short Email!”)) } else { Right(User(email)) } } case class Error(msg: String) case class User(email: String) ฦΓ ϝιου new & return Class
ETDBMB ࣮ࡍʹॻ͍ͯΈΑ͏ def signUp(email: String): Either[Error, User] = { If
(email.length < 5) { Left(Error(“Too Short Email!”)) } else { Right(User(email)) } } case class Error(msg: String) case class User(email: String) &JUIFS -FGU &SSPS 3JHIU 6TFS
ETDBMB ͭ·Γ͜͏͍͏͜ͱ ݺͼग़͠ݩ TJHO6Q &JUIFS -FGU &SSPS 3JHIU 6TFS &JUIFS
-FGU &SSPS 3JHIU 6TFS String
ETDBMB Τϥʔॲཧڧ੍Ͱ͖Δ def main(args: Array[String]): Unit = { val either=
signUp(“
[email protected]
”) either match { case Right(user) => logger.info(user.email) case Left(error) => logger.error(error.msg) } } ޭͳΒ ࣦഊͳΒ
ETDBMB ඒ͍͠ʢओ؍ʣ
ETDBMB ͓͞Β͍ w ΤϥʔPSਖ਼ৗͱ͍͏Λฦ੍ͯ͠ޚϑϩʔΛཧ͢Δ w &JUIFSΤϥʔॲཧΛڧ੍Ͱ͖Δ w ʢ͝ར༻ܭըతʹʣ
ETDBMB ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ