blob: cbed0b8a78e4d7e795a303292f85140a25c7a019 [file] [log] [blame]
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="../css/ot.css" />
<link rel="stylesheet" type="text/css" href="../css/otjld.css" />
<title>OT/J Language Definition v1.3.1</title>
</head>
<body class="otdt">
<div id="content">
<table class="nav">
<tr>
<td class="back"><a id="top"></a><a href="s6.2.c.html" rel="prev">&lt;&lt;&nbsp;&sect;6.2.(c)&nbsp;Team activation methods</a></td>
<td class="top"><a href="index.html" rel="contents">&uarr;&nbsp;Table of Contents&nbsp;&uarr;</a></td>
<td class="next"><a href="s6.2.e.html" rel="next">&sect;6.2.(e)&nbsp;Role migration&nbsp;&gt;&gt;</a></td>
</tr>
</table>
<div class="breadcrumb"><a class="nav" href="s6.html" rel="section">&sect;6&nbsp;Object Teams API</a>&nbsp;&gt;&nbsp;<a class="nav" href="s6.2.html" rel="section">&sect;6.2&nbsp;Other API Elements</a></div>
<div class="subsect depth3" id="s6.2.d">
<h4 class="subsect">&sect;6.2.(d)&nbsp;<span class="title">Exceptions</span><a class="img" href="s6.2.d.html" title="PermaLink to (d)&nbsp;Exceptions"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png"
alt="" /></a></h4>
<p>The following <code>Exceptions</code> can be thrown during the execution of an ObjectTeam/Java program:
</p>
<dl>
<dt><code>ResultNotProvidedException</code></dt>
<dd>Thrown if a replace callin without a base call does not provide the necessary (primitive type) base result
(see <a href="s4.3.e.html" title="&sect;4.3.(e)&nbsp;Fragile callin binding"
class="sect">&sect;4.3.(e)</a>).
</dd>
<dt><code>LiftingFailedException</code></dt>
<dd>Thrown if an actual ambiguity occurs during lifting (see <a href="s2.3.4.c.html" title="&sect;2.3.4.(c)&nbsp;Actual ambiguity"
class="sect">&sect;2.3.4.(c)</a>)
or if lifting would need to instantiate an abstract role class (see <a href="s2.5.b.html" title="&sect;2.5.(b)&nbsp;Relevant roles" class="sect">&sect;2.5.(b)</a>).
This is a checked exception.
See <a href="s2.3.5.html"
title="&sect;2.3.5&nbsp;Consequences of lifting problems"
class="sect">&sect;2.3.5</a> for more information.
</dd>
<dt><code>WrongRoleException</code></dt>
<dd>Thrown during lifting if the base object has, with respect to the same team instance, previously been lifted
to a role type that is not conform to the currently requested type
(see <a href="s2.3.4.d.html" title="&sect;2.3.4.(d)&nbsp;Mismatching role"
class="sect">&sect;2.3.4.(d)</a> and <a href="s2.4.3.html"
title="&sect;2.4.3&nbsp;Role creation in the presence of smart lifting"
class="sect">&sect;2.4.3</a>).
</dd>
<dt><code>DuplicateRoleException</code></dt>
<dd>Thrown during explicit role creation, if a new role is created for a base object, which already has a role
of the required type in the given team (see <a href="s2.4.1.c.html"
title="&sect;2.4.1.(c)&nbsp;Duplicate role runtime check"
class="sect">&sect;2.4.1.(c)</a>).
</dd>
<dt><code>RoleCastException</code></dt>
<dd>Thrown during cast of an externalized role, if the casted expression is anchored to a different team instance
than the cast type (see <a href="s1.2.4.b.html" title="&sect;1.2.4.(b)&nbsp;Casting" class="sect">&sect;1.2.4.(b)</a>).
</dd>
<dt><code>LiftingVetoException</code></dt>
<dd>This exception is used internally to abort the process of lifting when a relevant guard predicate (<a href="s5.4.html" title="&sect;5.4&nbsp;Guard predicates" class="sect">&sect;5.4</a>) evaluated to false.
Such exceptions thrown from generated code will never appear in client code, so there is usually no need to catch a <code>LiftingVetoException</code>.
However, in some situations it is useful to explicitly <em>throw</em> a <code>LiftingVetoException</code> from a lifting constructor (<a href="s2.3.1.b.html"
title="&sect;2.3.1.(b)&nbsp;Default lifting constructor"
class="sect">&sect;2.3.1.(b)</a>) of a role.
This style allows to abort lifting even after the lifting constructor has started to work and also for method parameters
requiring lifting.
If lifting was triggered due to a callin method binding, this binding will simply not trigger if a <code>LiftingVetoException</code> is thrown
while preparing the call to the role method.
</dd>
</dl>
</div>
<table class="nav">
<tr>
<td class="back"><a href="s6.2.c.html" rel="prev">&lt;&lt;&nbsp;&sect;6.2.(c)&nbsp;Team activation methods</a></td>
<td class="top"><a href="index.html" rel="contents">&uarr;&nbsp;Table of Contents&nbsp;&uarr;</a></td>
<td class="next"><a href="s6.2.e.html" rel="next">&sect;6.2.(e)&nbsp;Role migration&nbsp;&gt;&gt;</a></td>
</tr>
</table>
<div class="breadcrumb"><a class="nav" href="s6.html" rel="section">&sect;6&nbsp;Object Teams API</a>&nbsp;&gt;&nbsp;<a class="nav" href="s6.2.html" rel="section">&sect;6.2&nbsp;Other API Elements</a></div>
</div>
<div id="footer">
<hr /><a class="w3c img" href="http://jigsaw.w3.org/css-validator/check/referer"
shape="rect"><img src="../images/valid-css2-blue.png" alt="Valid CSS!" height="31" width="88" /></a><a class="w3c img" href="http://validator.w3.org/check?uri=referer" shape="rect"><img src="../images/valid-xhtml10-blue.png" alt="Valid XHTML 1.0 Strict" height="31"
width="88" /></a><address>&copy; Stephan Herrmann, Christine Hundt, Marco Mosconi</address>
OT/J version 1.3.1 &mdash; last modified: 2013-05-28
</div>
</body>
</html>