try {
manifestJSON = JSONObject.fromObject(manifestJSONString);
} catch (Throwable t) {
throw new RuntimeException("Could not parse widget manifest (" + t.getMessage() + ")");
}
widgets.add(new DashboardWidget(manifestJSON, (local ? "/" : baseURL) + "widgets"));
}
} catch (IOException e) {
throw new RuntimeException("Could not access widget manifest JSON URL: " + widgetUrl);
}
return widgets;