Administer > Deploy > Overview: WebSphere Commerce Build and Deployment tool > Customize the Build and Deployment tool > Custom Ant tasks
PrintStackTrace task
Sets the stack trace of a java.lang.Throwable object to a property. This task is intended to be used in conjunction with the tryCatch task provided by Ant-Contrib.
Parameters
Attribute Description Required Property The name of the property to set. Yes RefID The reference ID of the throwable object. Yes
Examples
The following example catches any exceptions occurred when running Ant with extract.xml and prints the entire stack trace to the console, as opposed to just the exception message as Ant does by default.
<trycatch reference="throwable"> <try> <ant antfile="extract.xml" /> </try> <catch> <printStackTrace refid="throwable" property="stackTrace" /> <echo message="${stackTrace}" /> </catch> </trycatch>
Related concepts
Overview: WebSphere Commerce Build and Deployment tool
Related reference