Hello,
as far as I know there is now way for you to pass a clean exception message from a script executed within a workflow to the Share user interface. The problem is that there are many application layers that this exception passes through and every layer usually adds some kind of information to the message whenever it handles an error that is unknown / not specific to that layer. Since the layer that executes scripts does not know (or care) about the specific types of errors any script may throw, it can not know which ones should be passed on unaltered and which need more information - it also does not know or particularily care about the fact that the script is executed within a workflow.
This is one use case where clean isolation of concerns results in situation that may be neither logical nor helpful to the developer / user.
One way I see you can handle this (and other kinds of errors) is by customizing the Alfresco Share JavaScript utility that handles error responses from the submission of the task form, and come up with a way to reliably strip out the unwanted pre-/suffixed information.
Another way would be by implementing your own AlfrescoScriptDelegate / AlfrescoJavaScript utility and handle the Java exception you receive from the script processor yourself, i.e. extracting the original error message and passing that up the stack to the Share user interface.
Regards
Axel