/*****************************************************************
 ** @author   STF 521
 ** @version  0.0.1
 ** @purpose  1:22.3.5, exception template not conforming to template(value) restriction
 ** @verdict  pass reject
 *****************************************************************/

// The following requirements are tested:
// f) The TemplateInstance shall conform to the template(value) restriction (see clause 15.8).

module NegSem_220305_raise_operation_010 {
	signature S() exception(charstring, octetstring);

	type port P procedure {
		inout S;
	}

    type component GeneralComp {
		port P p;
	}

	function f() runs on GeneralComp {
		p.getcall(S:?);
		p.raise(S, charstring:?);
        setverdict(pass);
	}

    testcase TC_NegSem_220305_raise_operation_010() runs on GeneralComp system GeneralComp {
        var GeneralComp v_ptc := GeneralComp.create;
		connect(self:p, v_ptc:p);
        v_ptc.start(f());
	    p.call(S:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation
        v_ptc.done;
    }

    control {
        execute(TC_NegSem_220305_raise_operation_010(), 5.0);
    }
}