# raise

The operation belongs to the family of procedure-based communication operations. It is used to raise an exception as a reaction to an accepted procedure call the result of which leads to an exceptional event.

- The operation can be used on connected procedure-based (or mixed) ports.
- In case of multiple connections the receiver may be addressed.

Related keywords:

- address
- create
- signature
- system
- to

### port_reference.raise ( signature_reference , [ exception_type:]exception_value ) [ to address_reference ] ;

- port_reference points out the port where the exception is sent through.

- The raise keyword introduces the exception.

- signature_reference points out the signature where the exception is defined

- The optional exception_type is used to point out the type of the value representing the exception when several types have been defined in the signature.

- exception_value is the value representing the exception

- The optional to keyword is used when a port is connected to several entities and identification of the communication partner is required.

- address_reference is one of the following:

  - a component reference (cf. create) or the keyword system, in case of one-to-many connections.
  - an address reference (cf. address) , when there are several entities within the system under test.

Example 1:

signature S_MyProccc (in charset pl_MyPar71) exception (integer, float);
MujPort_PCO.raise(S_MyProccc, integer:19) to system;

The signature S_MyProccc suitable for blocking communication is defined in the first line. It has one parameter (pl_MyPar71) and it may raise exceptions of integer and floating point type. In the second line, the exception is raised at the port MujPort_PCO. The port is connected to several components therefore it must be addressed, in our case to the test system interface. The exception raised is represented by an integer value (19)

BNF definition of raise