diff --git a/src/main/java/com/maddyhome/idea/vim/newapi/IjVimLogger.kt b/src/main/java/com/maddyhome/idea/vim/newapi/IjVimLogger.kt index 36f8847916..4e499f636a 100644 --- a/src/main/java/com/maddyhome/idea/vim/newapi/IjVimLogger.kt +++ b/src/main/java/com/maddyhome/idea/vim/newapi/IjVimLogger.kt @@ -32,6 +32,10 @@ internal class IjVimLogger(private val logger: Logger) : VimLogger { logger.error(message) } + override fun error(message: String, e: Throwable) { + logger.error(message, e) + } + override fun info(message: String) { logger.info(message) } diff --git a/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/command/MappingProcessor.kt b/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/command/MappingProcessor.kt index 38df466d91..73125f2583 100644 --- a/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/command/MappingProcessor.kt +++ b/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/command/MappingProcessor.kt @@ -182,20 +182,22 @@ public object MappingProcessor { } catch (e: Exception) { injector.messages.showStatusBarMessage(editor, e.message) injector.messages.indicateError() - log.warn( + log.error( """ Caught exception during ${mappingInfo.getPresentableString()} ${e.message} """.trimIndent(), + e ) } catch (e: NotImplementedError) { injector.messages.showStatusBarMessage(editor, e.message) injector.messages.indicateError() - log.warn( + log.error( """ Caught exception during ${mappingInfo.getPresentableString()} ${e.message} """.trimIndent(), + e ) } finally { mappingState.stopMapExecution() diff --git a/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/diagnostic/VimLogger.kt b/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/diagnostic/VimLogger.kt index 1388203d71..92dd92ec60 100644 --- a/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/diagnostic/VimLogger.kt +++ b/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/diagnostic/VimLogger.kt @@ -19,6 +19,7 @@ public interface VimLogger { public fun warn(message: String) public fun error(message: String) + public fun error(message: String, e: Throwable) public fun info(message: String) }