Revision c020555e
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/dialogs/RubikDialogTutorialView.java | ||
---|---|---|
77 | 77 |
|
78 | 78 |
if( jsonStream!=null ) |
79 | 79 |
{ |
80 |
JsonReader reader = JsonReader.getInstance(); |
|
81 |
reader.parseJsonTutorial(jsonStream); |
|
82 |
tutorials = reader.getTutorials(); |
|
80 |
try |
|
81 |
{ |
|
82 |
JsonReader reader = JsonReader.getInstance(); |
|
83 |
reader.parseJsonTutorial(jsonStream); |
|
84 |
tutorials = reader.getTutorials(); |
|
85 |
} |
|
86 |
catch(Exception ex) |
|
87 |
{ |
|
88 |
tutorials = null; |
|
89 |
} |
|
83 | 90 |
} |
84 | 91 |
|
85 | 92 |
if( tutorials!=null ) |
Also available in: Unified diff
Do not crash when something's wrong with the JSON file - handle this gracefully, do not change the object then, and report this to Firebase.