trap material indexing errors to continue indexing