File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
arduino-core/src/cc/arduino/contributions/libraries Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 3131
3232import cc .arduino .Constants ;
3333import cc .arduino .contributions .packages .ContributedPlatform ;
34+
35+ import com .fasterxml .jackson .core .JsonParseException ;
3436import com .fasterxml .jackson .databind .DeserializationFeature ;
37+ import com .fasterxml .jackson .databind .JsonMappingException ;
3538import com .fasterxml .jackson .databind .ObjectMapper ;
3639import com .fasterxml .jackson .module .mrbean .MrBeanModule ;
3740import org .apache .commons .compress .utils .IOUtils ;
@@ -101,8 +104,12 @@ private void parseIndex(File file) throws IOException {
101104 .forEach (library -> library .setCategory ("Uncategorized" ));
102105
103106 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 ()));
104111 } 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 () ));
106113 } finally {
107114 IOUtils .closeQuietly (indexIn );
108115 }
You can’t perform that action at this time.
0 commit comments