diff --git a/src/Event/Subscriber/StashUnstagedChangesSubscriber.php b/src/Event/Subscriber/StashUnstagedChangesSubscriber.php
index <HASH>..<HASH> 100644
--- a/src/Event/Subscriber/StashUnstagedChangesSubscriber.php
+++ b/src/Event/Subscriber/StashUnstagedChangesSubscriber.php
@@ -59,12 +59,19 @@ class StashUnstagedChangesSubscriber implements EventSubscriberInterface
      */
     public static function getSubscribedEvents()
     {
-        return [
+        $events = [
             RunnerEvents::RUNNER_RUN => ['saveStash', 10000],
             RunnerEvents::RUNNER_COMPLETE => ['popStash', -10000],
             RunnerEvents::RUNNER_FAILED => ['popStash', -10000],
-            ConsoleEvents::EXCEPTION => ['handleErrors', -10000],
         ];
+
+        // Backward compatibility layer for Symfony Console < 4.0.
+        $consoleErrorEvent = defined(ConsoleEvents::class.'::ERROR')
+            ? ConsoleEvents::ERROR
+            : ConsoleEvents::EXCEPTION;
+        $events[$consoleErrorEvent] = ['handleErrors', -10000];
+
+        return $events;
     }
 
     /**
Add backward compatibility for removed constant in Symfony Console <I>