initiate an error message when constraint or typesystem rule is violated on rebuild in sandbox

Hello forum!

My question is if it's possible to define such an error message on the rebuild or build process in a sandbox solution if a constraint or type system checking rule is violated.

The error message in the editor is unfortunately not enough, because on a rebuild of the sandbox solution the user wants in my case a message that he has done something wrong.

I appreciate every hint. Thanks!


m sch95


MPS->Preferences->Build, Execution, Deployment->Generator you can check "Check models for errors before generation". Then, you could use the logging language within your typesystem rules to provide your custom messages.


Thanks Ben! Problem solved!


Glad to hear that. Sorry, it's still to early in the morning :D Of course, you don't need the logging language in the typesystem rules. Use the typesystem messages instead.


What do you mean with typesystem messages?

As I said, I'm using a non-typesystem-rule with an error log message atm.


For instance, you can use the warning statement that is declared in jetbrains.mps.lang.typesystem. The typesystem provides you a nice overview on the current problems (see below). This is better practice than using the warn statement that comes from the logging language.


Please sign in to leave a comment.