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