mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
IJPL-172106 Warn macOS 15 users about potential issues with OS firewall, suggest workarounds
(cherry picked from commit f93923104bbac9611ff2c1441af07ca753cbb0dd) IJ-CR-150531 GitOrigin-RevId: 10a02c7b325a0e9a859e3a8b4e25069ec7827562
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8fe2820ca8
commit
4e0243a930
@@ -19,15 +19,17 @@ import java.net.NoRouteToHostException
|
||||
object NetUtils {
|
||||
private const val URL = "https://youtrack.jetbrains.com/articles/SUPPORT-A-564/Cannot-connect-to-remote-host-No-route-to-host-macOS-15-Sequoia"
|
||||
|
||||
private fun isNoRouteException(error: Throwable) = error is NoRouteToHostException || error.cause is NoRouteToHostException
|
||||
|
||||
fun getNetworkErrorSolutionMessage(error: Throwable, full: Boolean): @Nls String? {
|
||||
if (SystemInfo.isMacOSSequoia && error is NoRouteToHostException) {
|
||||
if (SystemInfo.isMacOSSequoia && isNoRouteException(error)) {
|
||||
return IdeCoreBundle.message(if (full) "mac15.local.network.issue.full.message" else "mac15.local.network.issue.message")
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
fun showNetworkErrorSolutionNotification(error: Throwable, project: Project?) {
|
||||
if (Registry.`is`("mac15.local.network.issue", true) && SystemInfo.isMacOSSequoia && error is NoRouteToHostException) {
|
||||
if (Registry.`is`("mac15.local.network.issue", true) && SystemInfo.isMacOSSequoia && isNoRouteException(error)) {
|
||||
Notification("Mac15 Local Network",
|
||||
IdeCoreBundle.message("mac15.local.network.issue.title"),
|
||||
IdeCoreBundle.message("mac15.local.network.issue.notification.message"),
|
||||
|
||||
Reference in New Issue
Block a user