mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-03 03:55:58 +01:00
Catch network exceptions (UnknownHostException etc.)
This commit is contained in:
@@ -11,9 +11,13 @@ object PluginRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def getPlugins(): Seq[PluginMetadata] = {
|
def getPlugins(): Seq[PluginMetadata] = {
|
||||||
val url = new java.net.URL("https://plugins.gitbucket-community.org/releases/plugins.json")
|
try {
|
||||||
val str = IOUtils.toString(url, "UTF-8")
|
val url = new java.net.URL("https://plugins.gitbucket-community.org/releases/plugins.json")
|
||||||
parsePluginJson(str)
|
val str = IOUtils.toString(url, "UTF-8")
|
||||||
|
parsePluginJson(str)
|
||||||
|
} catch {
|
||||||
|
case _: Throwable => Nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user