08-03-2018 09:01 AM
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??
08-03-2018 09:12 AM
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.
08-03-2018 09:22 AM
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 ??
Explore our Alfresco products with the links below. Use labels to filter content by product module.