I am upgrading from Mule 3.4 to 3.7. I have applications that handle exceptions by alerting administrators by email. In 3.4, I used to have the mule expression #[exception.getSummaryMessage()] for printing and emailing the information. It used to provide me the complete exception message with the exception stack as below:
Message : groovy.lang.MissingPropertyException: No such property: z for class: Script1 (javax.script.ScriptException) Type : org.mule.api.transformer.TransformerException Code : MULE_ERROR--2 JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html Transformer : ScriptTransformer{this=11810917, name='ScriptTransformer', ignoreBadInput=false, returnClass=SimpleDataType{type=java.lang.Object, mimeType='/', encoding='null'}, sourceTypes=[]}
Exception stack is: 1. No such property: z for class: Script1 (groovy.lang.MissingPropertyException) org.codehaus.groovy.runtime.ScriptBytecodeAdapter:53 (null) 2. groovy.lang.MissingPropertyException: No such property: z for class: Script1 (javax.script.ScriptException) org.codehaus.groovy.jsr223.GroovyScriptEngineImpl:326 (http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/script/ScriptException.html) 3. groovy.lang.MissingPropertyException: No such property: z for class: Script1 (javax.script.ScriptException) (org.mule.api.transformer.TransformerException) org.mule.module.scripting.transformer.ScriptTransformer:56 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html)
In 3.7, the same expression only gives me the exception message as below: groovy.lang.MissingPropertyException: No such property: z for class: Script1 (javax.script.ScriptException). Message payload is of type: NullPayload (org.mule.api.transformer.TransformerMessagingException). Message payload is of type: NullPayload
Could someone guide me as to how I can retrieve the exception in the previous format or how this can be achieved with Mule 3.7?