Skip to content

Display and control your Android device

Add method to log error without throwable

Romain Vimont2837c6eaab51
diff --git a/server/src/main/java/com/genymobile/scrcpy/Ln.java b/server/src/main/java/com/genymobile/scrcpy/Ln.java
index 9364519e..cd466b3e 100644
--- a/server/src/main/java/com/genymobile/scrcpy/Ln.java
+++ b/server/src/main/java/com/genymobile/scrcpy/Ln.java
@@ -52,7 +52,13 @@ public final class Ln {
if (isEnabled(Level.ERROR)) {
Log.e(TAG, message, throwable);
System.out.println("ERROR: " + message);
- throwable.printStackTrace();
+ if (throwable != null) {
+ throwable.printStackTrace();
+ }
}
}
+
+ public static void e(String message) {
+ e(message, null);
+ }
}