Skip to content
This repository was archived by the owner on Dec 18, 2022. It is now read-only.

Commit c816280

Browse files
authored
Merge pull request thaliproject#126 from zeroleak/add-OsType-UNSUPPORTED
Add OsType.UNSUPPORTED
2 parents c2453cf + b544d16 commit c816280

File tree

1 file changed

+3
-3
lines changed
  • universal/src/main/java/com/msopentech/thali/toronionproxy

1 file changed

+3
-3
lines changed

universal/src/main/java/com/msopentech/thali/toronionproxy/OsData.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import java.util.Scanner;
3434

3535
public class OsData {
36-
public enum OsType {WINDOWS, LINUX_32, LINUX_64, MAC, ANDROID}
36+
public enum OsType {WINDOWS, LINUX_32, LINUX_64, MAC, ANDROID, UNSUPPORTED}
3737
private static OsType detectedType = null;
3838

3939
public static OsType getOsType() {
@@ -62,7 +62,7 @@ protected static OsType actualGetOsType() {
6262
} else if (osName.contains("Linux")) {
6363
return getLinuxType();
6464
}
65-
throw new RuntimeException("Unsupported OS");
65+
return OsType.UNSUPPORTED;
6666
}
6767

6868
protected static OsType getLinuxType() {
@@ -91,7 +91,7 @@ protected static OsType getLinuxType() {
9191
if (unameOutput.compareTo("x86_64") == 0) {
9292
return OsType.LINUX_64;
9393
}
94-
throw new RuntimeException("Could not understand uname output, not sure what bitness");
94+
return OsType.UNSUPPORTED;
9595
} catch (IOException e) {
9696
throw new RuntimeException("Uname failure", e);
9797
} catch (InterruptedException e) {

0 commit comments

Comments
 (0)