From: Dmitry Batrak Date: Tue, 25 Oct 2016 07:23:15 +0000 (+0300) Subject: improve exception's description message X-Git-Tag: appcode/171.432~6 X-Git-Url: https://git.jetbrains.org/?p=idea%2Fcommunity.git;a=commitdiff_plain;h=d4b8dab057104c7f42e02cb2e5170f14674e56e1 improve exception's description message --- diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/CaretModelImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/CaretModelImpl.java index 708969c3d9b3..a1831eaa4810 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/CaretModelImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/CaretModelImpl.java @@ -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) { - throw new IllegalStateException("Current caret is defined, cannot operate on other ones"); + throw new IllegalStateException("Recursive runForEachCaret invocations are not allowed"); } doWithCaretMerging(() -> { try {