Showing an error message without throwing an exception

When you want to show the user that an error occured within the plugin, and you want the little red icon to flash and have a useful messsage, how do you do that without throwing an exception?

Is there some sort of logging that I'm not aware of?

Thanks in advance

0

The little red icon is only designed for showing exception reports. If you need to notify the user about an error, use the notification API (Notifications.Bus.Notify).

0
Avatar
Permanently deleted user

I think just logging an error should show in logs (show red icon popup)
if I got it correctly it should be logger instance of com.intellij.openapi.diagnostic.Logger

0
Avatar
Permanently deleted user

oh well, I was wrong it seems (see Dmitry's answer)

0
Avatar
Permanently deleted user

Thanks! this is exactly what i was looking for :)

0

请先登录再写评论。