diff --git a/ext/syncthing/src/github.com/syncthing/syncthing b/ext/syncthing/src/github.com/syncthing/syncthing index 6d280e7b..668eb7c3 160000 --- a/ext/syncthing/src/github.com/syncthing/syncthing +++ b/ext/syncthing/src/github.com/syncthing/syncthing @@ -1 +1 @@ -Subproject commit 6d280e7b6461d407c90f8706e348393c657e995f +Subproject commit 668eb7c398c2e8d0b9f7beb319b7789681d7d89f diff --git a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingRunnable.java b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingRunnable.java index e7b676de..177a595d 100644 --- a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingRunnable.java +++ b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingRunnable.java @@ -9,6 +9,8 @@ import android.preference.PreferenceManager; import android.text.TextUtils; import android.util.Log; +import com.nutomic.syncthingandroid.BuildConfig; + import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; @@ -152,9 +154,13 @@ public class SyncthingRunnable implements Runnable { case 1: // fallthrough default: - // Force crash if Syncthing exits with an error. - throw new RuntimeException("Syncthing binary crashed with error code " + - Integer.toString(ret) + ", output:\n" + mErrorLog); + // Report Syncthing crashes, using Exception in debug mode or log in release mode. + String message = "Syncthing binary crashed with error code " + + Integer.toString(ret) + ", output:\n" + mErrorLog; + if (BuildConfig.DEBUG) + throw new RuntimeException(message); + else + Log.e(TAG, message); } } catch (IOException | InterruptedException e) { Log.e(TAG, "Failed to execute syncthing binary or read output", e);