You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by bu...@apache.org on 2014/02/06 11:39:22 UTC

svn commit: r896618 - in /websites/staging/isis/trunk: cgi-bin/ content/ content/applib-guide/how-tos/

Author: buildbot
Date: Thu Feb  6 10:39:21 2014
New Revision: 896618

Log:
Staging update by buildbot for isis

Removed:
    websites/staging/isis/trunk/content/applib-guide/how-tos/how-to-06-020-How-to-deal-with-an-unexpected-error.html
Modified:
    websites/staging/isis/trunk/cgi-bin/   (props changed)
    websites/staging/isis/trunk/content/   (props changed)
    websites/staging/isis/trunk/content/applib-guide/how-tos/about.html
    websites/staging/isis/trunk/content/applib-guide/how-tos/how-to-06-010-How-to-pass-a-messages-and-errors-back-to-the-user.html
    websites/staging/isis/trunk/content/documentation.html

Propchange: websites/staging/isis/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Feb  6 10:39:21 2014
@@ -1 +1 @@
-1565148
+1565152

Propchange: websites/staging/isis/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Feb  6 10:39:21 2014
@@ -1 +1 @@
-1565148
+1565152

Modified: websites/staging/isis/trunk/content/applib-guide/how-tos/about.html
==============================================================================
--- websites/staging/isis/trunk/content/applib-guide/how-tos/about.html (original)
+++ websites/staging/isis/trunk/content/applib-guide/how-tos/about.html Thu Feb  6 10:39:21 2014
@@ -414,8 +414,7 @@ been placed vs one that has been shipped
 your app may also wish to notify the user also when something goes awry.</p>
 
 <ul>
-<li><a href="./how-to-06-010-How-to-pass-a-messages-and-errors-back-to-the-user.html">How to pass a messages and errors back to the user</a></li>
-<li><a href="./how-to-06-020-How-to-deal-with-an-unexpected-error.html">How to deal with an unexpected error</a></li>
+<li><a href="./how-to-06-010-How-to-pass-a-messages-and-errors-back-to-the-user.html">How to pass a messages and raise errors to the user</a></li>
 </ul>
 
 <h2>How to handle the entity persistence lifecycle</h2>

Modified: websites/staging/isis/trunk/content/applib-guide/how-tos/how-to-06-010-How-to-pass-a-messages-and-errors-back-to-the-user.html
==============================================================================
--- websites/staging/isis/trunk/content/applib-guide/how-tos/how-to-06-010-How-to-pass-a-messages-and-errors-back-to-the-user.html (original)
+++ websites/staging/isis/trunk/content/applib-guide/how-tos/how-to-06-010-How-to-pass-a-messages-and-errors-back-to-the-user.html Thu Feb  6 10:39:21 2014
@@ -298,18 +298,35 @@ message for a period of time in a non-mo
 viewer should require the user to acknowledge the message.</li>
 <li><code>raiseError(String message)</code></p>
 
-<p>Indicate that a serious application error has occurred. The viewer
+<p>Indicate that an application exception has occurred. The viewer
 should again require the user to acknowledge the message, and quite
 possibly indicate further steps that the user should perform (eg
-notify the help desk).</p>
-
-<p>In this last case, no changes will be made to any objects (the
-transaction is aborted).</li>
+notify the help desk).</li>
 </ul>
 
 <p>The precise mechanics of how each of these messages is rendered visible
 to the user is determined by the viewer being used.</p>
 
+<h2>Alternative way to raise an error</h2>
+
+<p>An alternative to calling <code>DomainObjectContainer#raiseError()</code> <!--(see ?)-->
+is to simply throw an <code>org.apache.isis.applib.ApplicationException</code>. Which
+you use is a matter of style, because the behaviour is exactly the same; internally <code>raiseError()</code> just throws the <code>ApplicationException</code>.</p>
+
+<p>As of [1.4.0-SNAPSHOT], can also throw <code>org.apache.isis.applib.RecoverableException</code>.</p>
+
+<h2>How to deal with an unrecoverable and unexpected error</h2>
+
+<p>Throw any exception that isn't a subclass of <code>ApplicationException</code> (or <code>RecoverableException</code> as of 1.4.0-SNAPSHOT).</p>
+
+<p>The <code>org.apache.isis.applib.UnrecoverableException</code> is provided as a convenient superclass to use, but this is not required.</p>
+
+<h2>Handling aborted transactions [1.4.0-SNAPSHOT]</h2>
+
+<p>If underlying transaction is aborted by the framework - for example as the result of a constraint violation in the objectstore - then the application code should <em>not</em> throw <code>ApplicationException</code> (or <code>RecoverableException</code>), it should throw some other (non-recoverable) exception.</p>
+
+<p>However, the wrong type of exception being thrown will be automatically detected, and a non-recoverable exception will be thrown instead.</p>
+
 
 
       </div>

Modified: websites/staging/isis/trunk/content/documentation.html
==============================================================================
--- websites/staging/isis/trunk/content/documentation.html (original)
+++ websites/staging/isis/trunk/content/documentation.html Thu Feb  6 10:39:21 2014
@@ -496,8 +496,8 @@
 <h4>Error handling</h4>
 
 <ul>
-<li><a href="./applib-guide/how-tos/how-to-06-010-How-to-pass-a-messages-and-errors-back-to-the-user.html">Raise message to users</a></li>
-<li><a href="./applib-guide/how-tos/how-to-06-020-How-to-deal-with-an-unexpected-error.html">Unexpected errors</a></li>
+<li><a href="./applib-guide/how-tos/how-to-06-010-How-to-pass-a-messages-and-errors-back-to-the-user.html">Raise message/errors to users</a></li>
+<li><a href="core/services/exception-recognizers.html">Exception Recognizer</a> service</li>
 </ul>
 
 <h4>Prototyping tips</h4>