mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-02-12 15:17:53 +01:00
DroidFish: Fix crash when starting network engine.
Fix crash when trying to start an incorrectly configured network engine with an invalid port number.
This commit is contained in:
parent
c64896b61f
commit
833a5afeef
|
@ -92,12 +92,15 @@ public class NetworkEngine extends UCIEngineBase {
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
isError = true;
|
isError = true;
|
||||||
report.reportError(e.getMessage());
|
report.reportError(e.getMessage());
|
||||||
} catch (NumberFormatException nfe) {
|
} catch (IllegalArgumentException e) {
|
||||||
isError = true;
|
isError = true;
|
||||||
report.reportError(context.getString(R.string.invalid_network_port));
|
report.reportError(context.getString(R.string.invalid_network_port));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
isError = true;
|
isError = true;
|
||||||
report.reportError(e.getMessage());
|
report.reportError(e.getMessage());
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
isError = true;
|
||||||
|
report.reportError(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (socket == null)
|
if (socket == null)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user