OTX Reference  
OpenTestSystem.Otx.Extensions.EventHandling.Terms.IsEventHasException Class Reference

Checks if an event:Event contains an exception More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.EventHandling.Terms.IsEventHasException:
Inheritance graph

Public Attributes

EventTerm _event
 Cardinality [1]
The Event to be tested for encapsulating an exception. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Terms.Term
MetaData metaData
 Cardinality [0..1]
The MetaData type allows tools to store additional, mainly tool-specific data. More...
 

Detailed Description

Checks if an event:Event contains an exception

IsEventHasException is a BooleanTerm that can be used to determine if an event:Event contains an exception. Any event source may report an exception by encapsulating it in an exception event.

For example, an attempt to execute a diag:DiagService asynchronously could fail with a diag:LossOfComException.In this case the event source can generate an event encapsulating the exception rather than the Result that it would normally return.

Syntax
BooleanTerm EventHandling.IsEventHasException(EventTerm _event);
Examples
// Local Declarations
DiagCom.ComChannel ComChannel1;
DiagCom.DiagService DiagService1;
Integer Integer1 = 99;
EventHandling.Event Event1;
Assertion.AssertionException Exception1;
EventHandling.EventSource EventSource1;
// Flow
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentECUIdent");
EventSource1 = DiagCom.DiagServiceEventSource(DiagService1);
[#MetaData("RequestPdu"), <#Data>22 04 07</#Data>]
DiagCom.ExecuteDiagService(DiagService1, {Param_RecorDataIdent = "VW Logical Software Block Counter Of Programming Attempts"}, {Resp_ReadDataByIdentECUIdent.Param_RecorDataIdent = Integer1}, NULL, NULL, false, false);
EventHandling.WaitForEvent({ EventSource1}, Event1);
Result = EventHandling.IsEventHasException(Event1);
DiagCom.CloseComChannel(ComChannel1);

Member Data Documentation

◆ _event

EventTerm OpenTestSystem.Otx.Extensions.EventHandling.Terms.IsEventHasException._event

Cardinality [1]
The Event to be tested for encapsulating an exception.

OpenTestSystem.Otx.Extensions.EventHandling.Terms.IsEventHasException._event
EventTerm _event
Cardinality [1] The Event to be tested for encapsulating an exception.
Definition: EventHandling.cs:1266