Is it possible to trigger a plugin action when an exception happens in the users console?
Answered
As the title says I am looking to trigger a plugin action by an exception happening in the user of the plugins console. If it is not possible specifically by an exception happening the ceasing of execution of the program would be the next best option. Thanks!
Please sign in to leave a comment.
Please clarify what does this mean "an exception happening in the user of the plugins console"? Do you mean, a custom plugin throwing exception while running in IDE? Then please see https://youtrack.jetbrains.com/issue/IJSDK-687
No, I want when a user is using my plugin and their code throws an exception for one of my plugin actions to be triggered.
Do you mean when they run their project's code, and there's an exception? How should a plugin learn about the exception, do you expect to have open "Run toolwindow" with console to monitor?
Yea that is what I mean, I am looking for any way to be able to do it.
I am still looking for a solution to this.
Your plugin can monitor/highlight console output via extension point com.intellij.execution.filters.ConsoleFilterProvider
Yann Cebron could you give an example of how to do this?
There's some implementations inside IJ or you can browse usages by 3rd party plugins https://plugins.jetbrains.com/intellij-platform-explorer/?extensions=com.intellij.consoleFilterProvider