ExceptPrint Function

Action

Prints all information about an exception to a results file.

Syntax

ExceptPrint ( )

Notes

ExceptPrint formats and prints the combined results of calls to ExceptCalls, ExceptData, and ExceptNum. If there is no data returned from ExceptData, then ExceptNum prints instead.

Example

[-] testcase ExceptPrintExample () 
	[-] do 
		[ ] Verify ("xxx", "yyy") 
	[-] except 
		[ ] ExceptPrint () 
	[-] do 
		[ ] raise 1, "My error"
	[-] except 
		[ ] ExceptPrint () 
	[-] do 
		[ ] Print ("This will cause an exception. {5/0}") 
	[-] except 
		[ ] ExceptPrint () 
	[ ] // This script prints: 
	[ ] // *** Error: Verify failed - expected yyy, got xxx 
	[ ] // Occurred in Verify 
	[ ] // Called from main at test.t(3)
	[ ] // My error 
	[ ] // Occurred in main at test.t(6) 
	[ ] // *** Error: Divide by zero 
	[ ] // Occurred in main at test.t(9)