Don't fail compilation if we can't emit a private artifact

Only fail for "public" and "deploy" artifacts (StandardLinkerContext's
produceOutput is only called for those 3 visibilities, "source"
artifacts and emitted by the SourceSaver).

This change reverts to the GWT 2.5.1 behavior, for private artifacts
only. The behavior was changed in 73862cc8ceb81c29a669d573441e231e4b272842

Bug: issue 8623
Change-Id: I7a87c13d33c942f9cbcd3c27ec90c9ea9c19c70d
(cherry picked from commit 3f48e50a22861ff2c32d5e44d65b7b2ed12d084a)
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java b/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java
index 5080b22..20792cc 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java
@@ -512,7 +512,10 @@
       } catch (IOException e) {
         artifactLogger.log(TreeLogger.ERROR,
             "Fatal error emitting artifact: " + artifact.getPartialPath(), e);
-        throw new UnableToCompleteException();
+        // Do not fail for Private artifacts, just log the error
+        if (visibility != Visibility.Private) {
+          throw new UnableToCompleteException();
+        }
       }
     }
   }