Bug 1233706 - Make error message more helpful for instrumented Robocop tests; r?sdaswani draft
authorPetru Lingurar <petru.lingurar@softvision.ro>
Thu, 26 Jul 2018 13:36:34 +0300
changeset 822915 48b84a7dc3eec9bfdb64646185f8627ad2809450
parent 822828 7ba07ef0e4532b644b812942aa38af4510dbc74f
push id117519
push userplingurar@mozilla.com
push dateThu, 26 Jul 2018 10:38:30 +0000
reviewerssdaswani
bugs1233706
milestone63.0a1
Bug 1233706 - Make error message more helpful for instrumented Robocop tests; r?sdaswani MozReview-Commit-ID: 286GgFXm0vR
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeDriver.java
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeDriver.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeDriver.java
@@ -444,17 +444,19 @@ public class FennecNativeDriver implemen
     }
 
     public static void log(LogLevel level, Throwable t) {
         log(level, null, t);
     }
 
     public static void log(LogLevel level, String message, Throwable t) {
         if (mLogFile == null) {
-            throw new RuntimeException("No log file specified!");
+            throw new RuntimeException(
+                    "No log file specified!\n" +
+                    "(If you are running this test from an IDE don't forget to before run \"robocop --serve\")");
         }
 
         if (level.isEnabled(mLogLevel)) {
             PrintWriter pw = null;
             try {
                 pw = new PrintWriter(new FileWriter(mLogFile, true));
                 if (message != null) {
                     pw.println(message);