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 Meetup
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
初中級者用如何使用backlog -VALE TUDOEDITION-
in0u
0
140
運用改善、不都合な真実 / 20240722-ssmjp-kaizen
opelab
17
8k
フルリモートワークはエンジニアの夢を叶えたか? #cm_odyssey
mamohacy
2
600
スレットハンティングについて知っておきたいこと
hacket
0
130
MySQLのロックの種類とその競合
yoku0825
6
1.6k
シフトレフトで挑む セキュリティの生産性向上
sekido
PRO
0
270
頼られるのが大好きな 皆さんへ - 支援相手との期待の合わせ方、突き放し方 -/For_people_who_like_to_be_relied_on
naitosatoshi
1
290
AIエージェントを現場に導入する目線とは
masahiro_nishimi
1
1.5k
AIアシスタントの活用で品質の向上と開発ワークフローのスピードアップ
nagix
1
200
楽しくGoを学び合う、LayerXの勉強会文化 / LayerX's study culture of having fun and learning Go together
ar_tama
2
350
JBUG岡山 #6 WordCamp男木島の チームビルディング
takeshifurusato
0
150
Docker互換のセキュアなコンテナ実行環境「Podman」超入門
devops_vtj
6
3.2k
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
79
5.5k
Web development in the modern age
philhawksworth
203
10k
Why Our Code Smells
bkeepers
PRO
332
56k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
19k
Typedesign – Prime Four
hannesfritz
37
2.2k
GitHub's CSS Performance
jonrohan
1026
450k
How to name files
jennybc
67
96k
Raft: Consensus for Rubyists
vanstee
134
6.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
17
8.7k
How STYLIGHT went responsive
nonsquared
93
5k
Building a Scalable Design System with Sketch
lauravandoore
458
32k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
662
120k
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!