Revision eb647d5e
Added by Leszek Koltunski about 3 years ago
src/main/java/org/distorted/main/RubikObjectLibInterface.java | ||
---|---|---|
329 | 329 |
|
330 | 330 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
331 | 331 |
|
332 |
public void reportProblem(String problem) |
|
332 |
public void reportProblem(String problem, boolean recordException)
|
|
333 | 333 |
{ |
334 | 334 |
if( BuildConfig.DEBUG ) |
335 | 335 |
{ |
... | ... | |
337 | 337 |
} |
338 | 338 |
else |
339 | 339 |
{ |
340 |
Exception ex = new Exception(problem); |
|
341 |
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance(); |
|
342 |
crashlytics.setCustomKey("problem" , problem); |
|
343 |
crashlytics.recordException(ex); |
|
340 |
if( recordException ) |
|
341 |
{ |
|
342 |
Exception ex = new Exception(problem); |
|
343 |
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance(); |
|
344 |
crashlytics.setCustomKey("problem" , problem); |
|
345 |
crashlytics.recordException(ex); |
|
346 |
} |
|
347 |
else |
|
348 |
{ |
|
349 |
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance(); |
|
350 |
crashlytics.log(problem); |
|
351 |
} |
|
344 | 352 |
} |
345 | 353 |
} |
346 | 354 |
|
src/main/java/org/distorted/tutorials/TutorialObjectLibInterface.java | ||
---|---|---|
51 | 51 |
|
52 | 52 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
53 | 53 |
|
54 |
public void reportProblem(String problem) |
|
54 |
public void reportProblem(String problem, boolean reportException)
|
|
55 | 55 |
{ |
56 | 56 |
if( BuildConfig.DEBUG ) |
57 | 57 |
{ |
... | ... | |
59 | 59 |
} |
60 | 60 |
else |
61 | 61 |
{ |
62 |
Exception ex = new Exception(problem); |
|
63 |
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance(); |
|
64 |
crashlytics.setCustomKey("problem" , problem); |
|
65 |
crashlytics.recordException(ex); |
|
62 |
if( reportException ) |
|
63 |
{ |
|
64 |
Exception ex = new Exception(problem); |
|
65 |
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance(); |
|
66 |
crashlytics.setCustomKey("problem" , problem); |
|
67 |
crashlytics.recordException(ex); |
|
68 |
} |
|
69 |
else |
|
70 |
{ |
|
71 |
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance(); |
|
72 |
crashlytics.log(problem); |
|
73 |
} |
|
66 | 74 |
} |
67 | 75 |
} |
68 | 76 |
|
Also available in: Unified diff
Better error reporting.