Catch any runtime exceptions also thrown by invokePersist().

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1883 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2006-07-28 01:31:28 +00:00
parent 31546d18bd
commit 652ad810f4
2 changed files with 6 additions and 4 deletions
@@ -56,7 +56,7 @@ public abstract class RepositoryListenerUnit<T> extends RepositoryUnit
}
@Override // from RepositoryUnit
public void handleFailure (PersistenceException pe)
public void handleFailure (Exception pe)
{
_listener.requestFailed(pe);
}
@@ -32,7 +32,7 @@ public abstract class RepositoryUnit extends Invoker.Unit
{
try {
invokePersist();
} catch (PersistenceException pe) {
} catch (Exception pe) {
_error = pe;
}
return true;
@@ -62,8 +62,10 @@ public abstract class RepositoryUnit extends Invoker.Unit
/**
* Called if our persistent actions failed, back on the non-invoker thread.
* Note that this may be either a {@link PersistenceException} thrown by
* {@link #invokePersist} or a {@link RuntimeException} thrown by same.
*/
public abstract void handleFailure (PersistenceException pe);
public abstract void handleFailure (Exception pe);
protected PersistenceException _error;
protected Exception _error;
}