corrected error reporting in example