File tree 1 file changed +8
-1
lines changed
arduino-core/src/cc/arduino/contributions/libraries
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 31
31
32
32
import cc .arduino .Constants ;
33
33
import cc .arduino .contributions .packages .ContributedPlatform ;
34
+
35
+ import com .fasterxml .jackson .core .JsonParseException ;
34
36
import com .fasterxml .jackson .databind .DeserializationFeature ;
37
+ import com .fasterxml .jackson .databind .JsonMappingException ;
35
38
import com .fasterxml .jackson .databind .ObjectMapper ;
36
39
import com .fasterxml .jackson .module .mrbean .MrBeanModule ;
37
40
import org .apache .commons .compress .utils .IOUtils ;
@@ -101,8 +104,12 @@ private void parseIndex(File file) throws IOException {
101
104
.forEach (library -> library .setCategory ("Uncategorized" ));
102
105
103
106
index = newIndex ;
107
+ } catch (JsonParseException | JsonMappingException e ) {
108
+ System .err .println (
109
+ format (tr ("Error parsing libraries index: {0}\n Try to open the Library Manager to update the libraries index." ),
110
+ e .getMessage ()));
104
111
} catch (Exception e ) {
105
- System .err .println ("Error parsing library. index:" + e .getMessage ());
112
+ System .err .println (format ( tr ( "Error reading libraries index: {0}" ), e .getMessage () ));
106
113
} finally {
107
114
IOUtils .closeQuietly (indexIn );
108
115
}
You can’t perform that action at this time.
0 commit comments