Hi all,
Want to show error message thrown from java in share page.
Tried like :
throw new Exception("Email-id already exists..! Please try with different email-id");
throw new AlfrescoRuntimeException("Email-id already exists..! Please try with different email-id");
How to show exceptions in share??
It always depends on the context that you are referring to. Are we talking about document library actions, or just arbitrary pieces of code calling the Repository-tier? Generally speaking, it is the responsibility of the client-side code (Share JavaScript) to show proper error messages. Most of the generic handling (i.e. document library actions) will simply show a generic error, unless you override the error handler via custom JavaScript.
Also, depending on the context of your Java code, some exception may simply not bubble up to the Share tier. This for example applies to transaction-level behaviours which will have any exceptions wrapped up in a very generic, technical exception, so the error message sent back to Share ultimately does not contain any useful information.
Actually wrote behaviour for avoiding duplication of email-id at the time of user creation.So tried like that to throw exception.
Alternatively need to write webscript that need to be call in users-min.js to show exception right ??
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.