Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Error handling on Android - 1st Android Athens Meetup
Pavlos-Petros Tournaris
September 22, 2016
Technology
0
140
Error handling on Android - 1st Android Athens Meetup
Pavlos-Petros Tournaris
September 22, 2016
Tweet
Share
Other Decks in Technology
See All in Technology
聴覚障害のある大学生チームによる臆さない発言環境の形成
hayato_ukuk
0
1.7k
WebLogic Server for OCI 概要
oracle4engineer
PRO
3
830
ML PM, DS PMってどんな仕事をしているの?
line_developers
PRO
1
190
JAWS-UG朝会_41_NakagawaAkihiro.pptx.pdf
anakagawa
2
610
Technologies for developing editors / Webエディタ開発を支える技術
shuta13
1
220
2022年に起きたフロントエンドの変化
sakito
27
16k
Startup Studio Sereal / Culture Deck
sereal
0
590
Things you should know about PHP
opdavies
1
470
JAWS-UG AI/ML #15 - SageMaker Experimentsで始める機械学習モデルの実験管理
masatakashiwagi
0
540
LINEにおけるネットワーク自動化チーム / Network Automation Team in LINE
line_developers
PRO
0
220
エアドロップ for オープンソースプロジェクト
epicsdao
0
120
DNS権威サーバのクラウドサービス向けに行われた攻撃および対策 / DNS Pseudo-Random Subdomain Attack and mitigations
kazeburo
2
330
Featured
See All Featured
Making Projects Easy
brettharned
102
4.8k
Git: the NoSQL Database
bkeepers
PRO
418
60k
Art Directing for the Web. Five minutes with CSS Template Areas
malarkey
196
9.8k
Visualization
eitanlees
128
12k
Building Adaptive Systems
keathley
27
1.3k
Code Reviewing Like a Champion
maltzj
508
38k
jQuery: Nuts, Bolts and Bling
dougneiner
57
6.6k
Gamification - CAS2011
davidbonilla
75
4.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
109
16k
5 minutes of I Can Smell Your CMS
philhawksworth
198
18k
Agile that works and the tools we love
rasmusluckow
320
20k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
318
19k
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!