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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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.8k
大AI時代で輝くために今こそドメインにディープダイブしよう / Deep Dive into Domain in AI-Agent-Era
yuitosato
2
3.2k
50人の組織でAIエージェントを使う文化を作るためには / How to Create a Culture of Using AI Agents in a 50-Person Organization
yuitosato
6
7.4k
Railway Oriented Programming を オニオンアーキテクチャに適用する by kotlin-result / Railway Oriented Programming in Onion Architecture by kotlin-result
yuitosato
5
1.5k
リファクタリングへの耐性が高いモデルベースの統合テストの紹介 / Model-Base Integration Test for Refactoring
yuitosato
7
3.7k
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.6k
ログラスの継続的ライブラリアップデートのWhyとHow / Why and How to Update Libraries Continuously in Loglass
yuitosato
0
510
Other Decks in Technology
See All in Technology
データの整合性を保ちたいだけなんだ
shoheimitani
7
2.7k
MySQLのJSON機能の活用術
ikomachi226
0
150
入社1ヶ月でデータパイプライン講座を作った話
waiwai2111
1
220
【インシデント入門】サイバー攻撃を受けた現場って何してるの?
shumei_ito
0
1.5k
2人で作ったAIダッシュボードが、開発組織の次の一手を照らした話― Cursor × SpecKit × 可視化の実践 ― Qiita AI Summit
noalisaai
1
370
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
3
1.1k
Azure Durable Functions で作った NL2SQL Agent の精度向上に取り組んだ話/jat08
thara0402
0
130
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
130
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
110
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
170
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
(金融庁共催)第4回金融データ活用チャレンジ勉強会資料
takumimukaiyama
0
120
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
230
[SF Ruby Conf 2025] Rails X
palkan
0
740
Building the Perfect Custom Keyboard
takai
2
680
Un-Boring Meetings
codingconduct
0
200
We Are The Robots
honzajavorek
0
160
Building a Scalable Design System with Sketch
lauravandoore
463
34k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
290
Typedesign – Prime Four
hannesfritz
42
2.9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
Discover your Explorer Soul
emna__ayadi
2
1.1k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
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 ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ