cancel
Showing results for 
Search instead for 
Did you mean: 

How to Show error message in Share from a repository policy

amin_zamani
Champ in-the-making
Champ in-the-making
Hi everybody,

I have written a policy within the repository (alfresco webapp). This policy is executed when in share a site is created. The policy validates some input data and if some fields are not ok an "AlfrescoRuntimeExcepion" is thrown with a (localized) error message. But the error message which the policy throws is never visible in Share UI. Share a Does someone know how to show this error message? Maybe a special exception type must be thrown?

Share shows always a standard error message which has nothing to do with my error message that I have thrown (I use alfresco 4.0.2.9 enterprise)

Thanks for helping us!

Best regards
Amin
2 REPLIES 2

curtis
Champ in-the-making
Champ in-the-making
Hi,

I have the same question, did you find out how to show new error message in Share UI ??

Regards,

mrogers
Star Contributor
Star Contributor
If you want exception information in Share then it will need to be passed back in some sort of data structure to Share.    If its your web script then you have control of how errors are presented so there's no problem.   And alfresco has the code to split runtime exceptions into JIRA structures that can be returned to the client app.

However full details are not normally passed back as in some situations it can be a security hole,  revealing implementation details that should be private or revealing meaningless levels of detail to the end user. 

Perhaps that's a weak argument but that's the way it is.