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
Error handling on Android - 1st Android Athens ...
Search
Pavlos-Petros Tournaris
September 22, 2016
Technology
0
160
Error handling on Android - 1st Android Athens Meetup
Pavlos-Petros Tournaris
September 22, 2016
Tweet
Share
Other Decks in Technology
See All in Technology
技術ブログや登壇資料を秒で作るコツ伝授します
minorun365
PRO
23
5.3k
#Zenoh 完全に理解した 〜組込み純情篇〜
takasehideki
1
480
難しいから面白い!医薬品×在庫管理ドメインの複雑性と向き合い、プロダクトの成長を支えるための取り組み / Initiatives to Support Product Growth
kakehashi
2
170
LLMに日本語テキストを学習させる意義
ksaito
13
3.7k
2024年版 運用者たちのLLM
nwiizo
3
510
タイミーのBraze活用 ~PUSH通知を活用したレコメンド~
ozeshun
2
150
Datadog を使ったプロダクトとクラウドの セキュリティモニタリング
mrtc0
0
610
より快適なエラーログ監視を目指して
leveragestech
3
930
自社サービスのための独自リリース版Redmine「RedMica」の取り組み
vividtone
0
1.1k
自社開発した大規模言語モデルをどうプロダクションに乗せて運用していくか〜インフラ編〜
pfn
PRO
22
6.5k
AWSを始めた頃に陥りがちなポイントをまとめてみた
oshanqq
1
3.4k
Segment Anything Model 2
tenten0727
2
350
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
425
64k
A designer walks into a library…
pauljervisheath
201
24k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Bash Introduction
62gerente
608
210k
Making the Leap to Tech Lead
cromwellryan
128
8.8k
Code Reviewing Like a Champion
maltzj
518
39k
Making Projects Easy
brettharned
113
5.8k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
45
4.8k
The Brand Is Dead. Long Live the Brand.
mthomps
53
37k
The World Runs on Bad Software
bkeepers
PRO
64
11k
Music & Morning Musume
bryan
46
6k
Imperfection Machines: The Place of Print at Facebook
scottboms
263
13k
Transcript
Error Handling Efficient error handling on Android https://github.com/Workable/java-error-handler
Error Handling on Android Vasilis Charalampakis Android Software Engineer @
Workable
[email protected]
Pavlos-Petros Tournaris Android Software Engineer @ Workable
[email protected]
A common problem in Software
1. Have a default handler for every expected (exceptional, common
or not) error. 2. Handle specific errors as appropriate based on where and when they occur. 3. Have a default catch-all handler for unknown errors. 4. Override any default handler if needed. 5. Keep our code DRY.
Global VS Specific Global Handle an error in a common
way Specific Handle an error specifically for a screen
Approach
Solution https://github.com/Workable/java-error-handler
API • Initialize • Configure • Execute
Initialize • defaultErrorHandler() • create() • createIsolated()
Configure • on(T, Action) • on(Class<? extends Exception>, Action) •
clear() • bindErrorCode(T, MatcherFactory<T>) • bindErrorCodeClass(Class<T>, MatcherFactory<T>)
Configure • skipFollowing() • skipAlways() • skipDefaults() • always(Action) •
otherwise(Action)
Execute • handle(throwable); • run(() -> foo()); // Coming soon…
DEMO https://github.com/pavlospt/error-handler-demo
Thanks!