public class PluginException
extends java.lang.RuntimeException
Logger.error(Throwable)
method and reported to JetBrains by user, they may be automatically attributed to corresponding plugins.
If the problem is caused by a class, use createByClass(java.lang.String, java.lang.Throwable, java.lang.Class<?>)
to create
an instance. If the problem is caused by an extension, implement PluginAware
in its extension class
to get the plugin ID.
In order to report problems from code in 'intellij.platform.extensions' module where this class is not accessible, use
ExtensionInstantiationException
or ExtensionException
instead.
Constructor and Description |
---|
PluginException(java.lang.String message,
PluginId pluginId) |
PluginException(java.lang.String message,
java.lang.Throwable cause,
PluginId pluginId) |
PluginException(java.lang.Throwable e,
PluginId pluginId) |
Modifier and Type | Method and Description |
---|---|
static PluginException |
createByClass(java.lang.String errorMessage,
java.lang.Throwable cause,
java.lang.Class<?> pluginClass)
Creates an exception caused by a problem in a plugin's code.
|
static PluginException |
createByClass(java.lang.Throwable cause,
java.lang.Class<?> pluginClass)
Creates an exception caused by a problem in a plugin's code, takes error message from the cause exception.
|
java.lang.String |
getMessage() |
PluginId |
getPluginId() |
static void |
logPluginError(Logger logger,
java.lang.String errorMessage,
java.lang.Throwable cause,
java.lang.Class<?> pluginClass)
Log an error caused by a problem in a plugin's code.
|
public PluginException(java.lang.String message, java.lang.Throwable cause, PluginId pluginId)
public PluginException(java.lang.Throwable e, PluginId pluginId)
public PluginException(java.lang.String message, PluginId pluginId)
public PluginId getPluginId()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public static PluginException createByClass(java.lang.String errorMessage, java.lang.Throwable cause, java.lang.Class<?> pluginClass)
pluginClass
- a problematic class which caused the errorpublic static PluginException createByClass(java.lang.Throwable cause, java.lang.Class<?> pluginClass)
pluginClass
- a problematic class which caused the errorpublic static void logPluginError(Logger logger, java.lang.String errorMessage, java.lang.Throwable cause, java.lang.Class<?> pluginClass)
pluginClass
- a problematic class which caused the error