throws: Improve assertion message in sample code