improve exception's description message
authorDmitry Batrak <Dmitry.Batrak@jetbrains.com>
Tue, 25 Oct 2016 07:23:15 +0000 (10:23 +0300)
committerDmitry Batrak <Dmitry.Batrak@jetbrains.com>
Tue, 25 Oct 2016 07:24:42 +0000 (10:24 +0300)
platform/platform-impl/src/com/intellij/openapi/editor/impl/CaretModelImpl.java

index 708969c3d9b3d2b1b27972c93eec388eac3d3173..a1831eaa481083750a1db3a0f8852785a47fd355 100644 (file)
@@ -348,7 +348,7 @@ public class CaretModelImpl implements CaretModel, PrioritizedDocumentListener,
   public void runForEachCaret(@NotNull final CaretAction action, final boolean reverseOrder) {
     EditorImpl.assertIsDispatchThread();
     if (myCurrentCaret != null) {
   public void runForEachCaret(@NotNull final CaretAction action, final boolean reverseOrder) {
     EditorImpl.assertIsDispatchThread();
     if (myCurrentCaret != null) {
-      throw new IllegalStateException("Current caret is defined, cannot operate on other ones");
+      throw new IllegalStateException("Recursive runForEachCaret invocations are not allowed");
     }
     doWithCaretMerging(() -> {
       try {
     }
     doWithCaretMerging(() -> {
       try {