| <!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</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"><< §6.2.(c) Team activation methods</a></td> |
| <td class="top"><a href="index.html" rel="contents">↑ Table of Contents ↑</a></td> |
| <td class="next"><a href="s6.2.e.html" rel="next">§6.2.(e) Role migration >></a></td> |
| </tr> |
| </table> |
| <div class="breadcrumb"><a class="nav" href="s6.html" rel="section">§6 Object Teams API</a> > <a class="nav" href="s6.2.html" rel="section">§6.2 Other API Elements</a></div> |
| <div class="subsect depth3" id="s6.2.d"> |
| <h4 class="subsect">§6.2.(d) <span class="title">Exceptions</span><a class="img" href="s6.2.d.html" title="PermaLink to (d) 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="§4.3.(e) Fragile callin binding" |
| class="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="§2.3.4.(c) Actual ambiguity" |
| class="sect">§2.3.4.(c)</a>). |
| </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="§2.3.4.(d) Mismatching role" |
| class="sect">§2.3.4.(d)</a> and <a href="s2.4.3.html" |
| title="§2.4.3 Role creation in the presence of smart lifting" |
| class="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="§2.4.1.(c) Duplicate role runtime check" |
| class="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="§1.2.4.(b) Casting" class="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="§5.4 Guard predicates" class="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="§2.3.1.(b) Default lifting constructor" |
| class="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"><< §6.2.(c) Team activation methods</a></td> |
| <td class="top"><a href="index.html" rel="contents">↑ Table of Contents ↑</a></td> |
| <td class="next"><a href="s6.2.e.html" rel="next">§6.2.(e) Role migration >></a></td> |
| </tr> |
| </table> |
| <div class="breadcrumb"><a class="nav" href="s6.html" rel="section">§6 Object Teams API</a> > <a class="nav" href="s6.2.html" rel="section">§6.2 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>© Stephan Herrmann, Christine Hundt, Marco Mosconi</address> |
| OT/J version 1.3 — last modified: 2010-05-18 |
| </div> |
| </body> |
| </html> |