stop

Syntax

[#stop]
or
[#stop cause]

where:

Description

The stop directive aborts the evaluation process. This is something like an emergency brake: don't use it in normal situations. Aborting happens by throwing a com.sodius.core.mdw.eval.EvaluationException, and this exception will hold the value of cause parameter.

Examples

This aborts the evaluation if the model parameter does not contain any instance:

[#package com.mycompany.example]

[#template public GenerateModel(in model : uml21)]
[#if model.instances.isEmpty()]
  [#stop "Wow! The model is not supposed to be empty here !"]
...
[/#template]