Remove unused interface ExceptionListener.
Nothing is listening for exceptions.
Discovered while cleaning up cquery error output.
PiperOrigin-RevId: 419617188
diff --git a/src/main/java/com/google/devtools/build/lib/events/ExceptionListener.java b/src/main/java/com/google/devtools/build/lib/events/ExceptionListener.java
deleted file mode 100644
index fb29f20..0000000
--- a/src/main/java/com/google/devtools/build/lib/events/ExceptionListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2014 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package com.google.devtools.build.lib.events;
-
-import net.starlark.java.syntax.Location;
-
-/**
- * The ExceptionListener is the primary means of reporting exceptions. It is a subset of the
- * functionality of the {@link Reporter}.
- */
-public interface ExceptionListener {
- /**
- * Reports an error.
- */
- void error(Location location, String message, Throwable error);
-}
diff --git a/src/main/java/com/google/devtools/build/lib/events/Reporter.java b/src/main/java/com/google/devtools/build/lib/events/Reporter.java
index a5a78a5..c9e5190 100644
--- a/src/main/java/com/google/devtools/build/lib/events/Reporter.java
+++ b/src/main/java/com/google/devtools/build/lib/events/Reporter.java
@@ -38,7 +38,7 @@
* <p>Thread-safe: calls to {@code #report} may be made on any thread. Handlers may be run in an
* arbitrary thread (but right now, they will not be run concurrently).
*/
-public final class Reporter implements ExtendedEventHandler, ExceptionListener {
+public final class Reporter implements ExtendedEventHandler {
/** Set of {@link EventHandler} registered in this reporter. */
private final ConcurrentLinkedQueue<EventHandler> eventHandlers = new ConcurrentLinkedQueue<>();
@@ -170,7 +170,6 @@
handle(Event.of(EventKind.FINISH, location, message));
}
- @Override
public void error(Location location, String message, Throwable error) {
handle(Event.error(location, message));
error.printStackTrace(new PrintStream(getOutErr().getErrorStream()));