mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
13426: Support for fix to ETHREEOH-1157: Allow dialogs to propagate exceptions ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.1:r13426 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13541 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -44,6 +44,7 @@ import javax.faces.el.EvaluationException;
|
||||
import javax.faces.el.MethodBinding;
|
||||
import javax.faces.event.AbortProcessingException;
|
||||
import javax.faces.event.ActionEvent;
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
import org.alfresco.config.ConfigElement;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
@@ -56,6 +57,7 @@ import org.alfresco.jlan.server.filesys.FilesystemsConfigSection;
|
||||
import org.alfresco.model.ApplicationModel;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||
import org.alfresco.repo.webdav.WebDAVServlet;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.model.FileFolderService;
|
||||
@@ -814,6 +816,20 @@ public final class Utils extends StringUtils
|
||||
*/
|
||||
public static void addErrorMessage(String msg, Throwable err)
|
||||
{
|
||||
UserTransaction txn = RetryingTransactionHelper.getActiveUserTransaction();
|
||||
if (txn != null)
|
||||
{
|
||||
// We're in a transaction and need to ensure that we ONLY rollback
|
||||
try
|
||||
{
|
||||
txn.setRollbackOnly();
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
|
||||
FacesContext context = FacesContext.getCurrentInstance( );
|
||||
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg);
|
||||
context.addMessage(null, facesMsg);
|
||||
|
Reference in New Issue
Block a user