Merge pull request #2106 from x-way/catch-network-plugin-exceptions

Catch network exceptions (UnknownHostException etc.)
This commit is contained in:
Naoki Takezoe
2018-07-17 00:38:06 +09:00
committed by GitHub

View File

@@ -11,9 +11,13 @@ object PluginRepository {
}
def getPlugins(): Seq[PluginMetadata] = {
try {
val url = new java.net.URL("https://plugins.gitbucket-community.org/releases/plugins.json")
val str = IOUtils.toString(url, "UTF-8")
parsePluginJson(str)
} catch {
case _: Throwable => Nil
}
}
}