error reporting works correctly