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
170
Error handling on Android - 1st Android Athens Meetup
Pavlos-Petros Tournaris
September 22, 2016
Tweet
Share
Other Decks in Technology
See All in Technology
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
2
560
ハイパーパラメータチューニングって何をしているの
toridori_dev
0
140
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
220
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
いざ、BSC討伐の旅
nikinusu
2
770
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
1
1.6k
B2B SaaS × AI機能開発 〜テナント分離のパターン解説〜 / B2B SaaS x AI function development - Explanation of tenant separation pattern
oztick139
2
210
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
410
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
1
2.3k
Platform Engineering for Software Developers and Architects
syntasso
1
510
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
3
420
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Making the Leap to Tech Lead
cromwellryan
133
8.9k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Code Review Best Practice
trishagee
64
17k
Statistics for Hackers
jakevdp
796
220k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Six Lessons from altMBA
skipperchong
27
3.5k
BBQ
matthewcrist
85
9.3k
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!