Table of Contents

Interface IExceptionHandler

Namespace
NMF.Interop.Uml
Assembly
NMF.UMLInterop.dll

The public interface for ExceptionHandler

[DefaultImplementationType(typeof(ExceptionHandler))]
[XmlDefaultImplementationType(typeof(ExceptionHandler))]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//ExceptionHandler")]
public interface IExceptionHandler : IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inherited Members

Properties

ExceptionInput

An ObjectNode within the handlerBody. When the ExceptionHandler catches an exception, the exception token is placed on this ObjectNode, causing the handlerBody to execute. <p>From package UML::Activities.</p>

[XmlElementName("exceptionInput")]
[XmlAttribute(true)]
IObjectNode ExceptionInput { get; set; }

Property Value

IObjectNode

ExceptionType

The Classifiers whose instances the ExceptionHandler catches as exceptions. If an exception occurs whose type is any exceptionType, the ExceptionHandler catches the exception and executes the handlerBody. <p>From package UML::Activities.</p>

[LowerBound(1)]
[XmlElementName("exceptionType")]
[XmlAttribute(true)]
ISetExpression<IClassifier> ExceptionType { get; }

Property Value

ISetExpression<IClassifier>

HandlerBody

An ExecutableNode that is executed if the ExceptionHandler catches an exception. <p>From package UML::Activities.</p>

[XmlElementName("handlerBody")]
[XmlAttribute(true)]
IExecutableNode HandlerBody { get; set; }

Property Value

IExecutableNode

ProtectedNode

The ExecutableNode protected by the ExceptionHandler. If an exception propagates out of the protectedNode and has a type matching one of the exceptionTypes, then it is caught by this ExceptionHandler. <p>From package UML::Activities.</p>

[Browsable(false)]
[XmlElementName("protectedNode")]
[XmlAttribute(true)]
[XmlOpposite("handler")]
IExecutableNode ProtectedNode { get; set; }

Property Value

IExecutableNode

Methods

Edge_source_target(object, object)

An ActivityEdge that has a source within the handlerBody of an ExceptionHandler must have its target in the handlerBody also, and vice versa. let nodes:Set(ActivityNode) = handlerBody.oclAsType(Action).allOwnedNodes() in nodes.outgoing->forAll(nodes->includes(target)) and nodes.incoming->forAll(nodes->includes(source))

bool Edge_source_target(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Exception_input_type(object, object)

The exceptionInput must either have no type or every exceptionType must conform to the exceptionInput type. exceptionInput.type=null or exceptionType->forAll(conformsTo(exceptionInput.type.oclAsType(Classifier)))

bool Exception_input_type(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Handler_body_edges(object, object)

The handlerBody has no incoming or outgoing ActivityEdges and the exceptionInput has no incoming ActivityEdges. handlerBody.incoming->isEmpty() and handlerBody.outgoing->isEmpty() and exceptionInput.incoming->isEmpty()

bool Handler_body_edges(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Handler_body_owner(object, object)

The handlerBody must have the same owner as the protectedNode. handlerBody.owner=protectedNode.owner

bool Handler_body_owner(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

One_input(object, object)

The handlerBody is an Action with one InputPin, and that InputPin is the same as the exceptionInput. handlerBody.oclIsKindOf(Action) and let inputs: OrderedSet(InputPin) = handlerBody.oclAsType(Action).input in inputs->size()=1 and inputs->first()=exceptionInput

bool One_input(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Output_pins(object, object)

If the protectedNode is an Action with OutputPins, then the handlerBody must also be an Action with the same number of OutputPins, which are compatible in type, ordering, and multiplicity to those of the protectedNode. (protectedNode.oclIsKindOf(Action) and protectedNode.oclAsType(Action).output->notEmpty()) implies ( handlerBody.oclIsKindOf(Action) and let protectedNodeOutput : OrderedSet(OutputPin) = protectedNode.oclAsType(Action).output, handlerBodyOutput : OrderedSet(OutputPin) = handlerBody.oclAsType(Action).output in protectedNodeOutput->size() = handlerBodyOutput->size() and Sequence{1..protectedNodeOutput->size()}->forAll(i | handlerBodyOutput->at(i).type.conformsTo(protectedNodeOutput->at(i).type) and handlerBodyOutput->at(i).isOrdered=protectedNodeOutput->at(i).isOrdered and handlerBodyOutput->at(i).compatibleWith(protectedNodeOutput->at(i))) )

bool Output_pins(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool