Skip to content

Exceptions

What does the dollar sign in error messages mean?

The sign indicates an anonymous class (more information ⧉).

For a list of common Java exceptions, look at The Exception Hierarchy and Types of Exception in Java with Examples. This list ⧉ includes documentation for all kinds of exceptions.

Here is some more information for exceptions that often occur in MPS:

MPS

Module Validation

Module validation refers to checkers that implement the interface IChecker and show their result in the logical view. An example for such a checker is StructureChecker ⧉. They are registered in the component plugin MPSProjectValidation ⧉

Can't find / couldn't load X (language, devkit…) 🔰

X couldn't be loaded. The plugin containing X was not installed / the dependency was not fetched and added as a library. Install the plugin/open the project containing the language/fetch the dependency.

Could not find the generation plan associated with the devkit

"The generation plan couldn't be loaded. The plugin containing X was not installed / the dependency was not fetched and added as a library. Install the plugin/open the project containing the language/fetch the dependency.

No generation plan in model X

The referenced model for the generation plan in the properties doesn't contain a generation plan.

Cycle in extended language hierarchy.

The languages extend each other in a way that creates a cycle hierarchy, for example, two languages extend each other. Read the documentation section about dependencies. Use the dependency analyzer ⧉ to understand the cycle better.

Subconcepts for language x found, missing extends dependency.

One or multiple concepts extend concepts from another language but don't have an extends dependency on the other language. Add a extends dependency ⧉ to the other language in the dependency section of the module properties.

Superfluous extended module x, not referenced from the structure aspect.

The dependency was accidentally added or is needed for a custom aspect and not the structure or editor aspect. Remove the dependency in the first case, and keep it for the second case.

Missing runtime module x.

A runtime solution ⧉ couldn't be loaded. The plugin containing the solution was not installed / the dependency was not fetched and added as a library.

Runtime module x is not a solution.

The added runtime module is a language or other type of module. Add a module of type solution instead.

Missing accessory model x.

The accessory model couldn't be loaded. The plugin containing the model was not installed / the dependency was not fetched and added as a library. | Install the plugin/open the project containing the language/fetch the dependency.

Accessory model x is not visible in the module.

All modules visible from given modules include modules from dependencies, transitive, respecting reexports, including initial modules. Make sure to only refer to one of those modules. |

Accessory model x uses language it's part of.

Mark the model as 'do not generate' to avoid unnecessary bootstrap dependency.

Accessory models are deemed design-time facility.

The models are used to generate some code. This is not the best way to utilize accessory models. The models shall be marked as 'do not generate.'

Type of Exceptions

name example description
ModuleLoaderException ⧉ none Deprecated exception that is not thrown anymore since 2017.
ModelReadException ⧉ *.mps file is corrupt It indicates failure to read the model. It is not specific to 'default' persistence.
IllegalModelAccessException ⧉ You access a model from a Java Swing button handler (e.g., you can read the model only inside read actions). It indicates forbidden operations over a SModel/SNode (official documentation ⧉).
AssertionError: Taking the target node of a dynamic reference
whose source node is not in a model ⧉
a node is in a detached state The source of a dynamic reference doesn't belong to a model.
Position n is not allowed for X The caret is the first position, but the first position was disabled in the style. The caret is in a position that is not allowed.
ModuleClassLoaderIsDisposedException A module couldn't be disposed of, and is loaded again. The class loader of a module is disposed of.
ClassLoader of module could not be found A module can't be loaded because the class loader can't be found.

IntelliJ Platform

name example description
PluginException ⧉ Usage of deprecated IntelliJ SDK methods Represents an internal error caused by a plugin. It may happen if the plugin's code fails with an exception or if the plugin violates some contract of IntelliJ Platform.
AlreadyDisposedException ⧉ An already disposed of object gets disposed again (e.g, a project)
Exception from class SlowOperations ⧉ MPS-34029 ⧉ If you get an exception from this method, then you need to move the computation to the background while also trying to avoid blocking the UI thread.
The argument for the @NotNull parameter must not be null method with @NotNull Annotation is called with null A null check failed (official documentation ⧉).
Action dispatch failed. The execution of an action ⧉ failed.
ExtensionInstantiationException ⧉ This exception is thrown if some extension (service, extension point) fails to initialize.

Comments