$30 off During Our Annual Pro Sale. View Details »
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
プロダクトマネージャーは 事業責任者の夢をみるのか pmconf2024
gimupop
2
9.2k
AWS re:Invent 2024登壇資料(GBL206-JA: Unleashing the power of generative AI on AWS for your business)
minorun365
PRO
7
250
My Generation 年配者がこの先生きのこるには (Developers CAREER Boost 2024 Edition)/My Generation How elder engineers can survive
kwappa
3
380
後処理で位置情報を補正する技術を試してみた
kensuketakahara
0
100
論理レプリケーションを使ったDB統合
kkato1
0
330
新機能Amazon GuardDuty Extended Threat Detectionはネ申って話
cmusudakeisuke
0
260
Advancing the 3D Geospatial Ecosystem in Japan via Global Collaborations
osgeojp
0
190
Ruby on Browser - RubyWorld Conference 2024
tmtms
1
120
2024 眼科AIコンテスト手法解説スライド 第5回日本眼科AI学会総会
minamikoyasuganka
0
120
突き破って学ぶコンテナセキュリティ/container-breakout-cncj-lt
mochizuki875
7
1.1k
【全貌公開】 MIXI の Atlassian Cloud 移行の裏側 / Behind MIXI's Migration to Atlassian Cloud
mixi_engineers
PRO
0
140
Kubernetesを知る
logica0419
18
5.4k
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
27
2.1k
Practical Orchestrator
shlominoach
186
10k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
The Pragmatic Product Professional
lauravandoore
32
6.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
A Tale of Four Properties
chriscoyier
157
23k
Docker and Python
trallard
41
3.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Making Projects Easy
brettharned
116
5.9k
Optimising Largest Contentful Paint
csswizardry
33
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!