@@ -699,11 +699,11 @@ void ExodusII_IO::read (const std::string & fname)
699699 int mapped_shellface = raw_side_index ;
700700
701701 // Check for errors
702- libmesh_error_msg_if (mapped_shellface == ExodusII_IO_Helper :: Conversion :: invalid_id ,
703- "Invalid 1 -based side id: "
702+ libmesh_error_msg_if (mapped_shellface < 0 || mapped_shellface >= 2 ,
703+ "Bad 0 -based shellface id: "
704704 << mapped_shellface
705- << " detected for "
706- << Utility :: enum_to_string ( elem . type ()) );
705+ << " detected in Exodus file "
706+ << exio_helper -> current_filename );
707707
708708 // Add this (elem,shellface,id) triplet to the BoundaryInfo object.
709709 mesh .get_boundary_info ().add_shellface (libmesh_elem_id ,
@@ -720,7 +720,18 @@ void ExodusII_IO::read (const std::string & fname)
720720 "Invalid 1-based side id: "
721721 << side_index
722722 << " detected for "
723- << Utility ::enum_to_string (elem .type ()));
723+ << Utility ::enum_to_string (elem .type ())
724+ << " in Exodus file "
725+ << exio_helper -> current_filename );
726+
727+ libmesh_error_msg_if (mapped_side < 0 ||
728+ cast_int < unsigned int > (mapped_side ) >= elem .n_sides (),
729+ "Bad 0-based side id: "
730+ << mapped_side
731+ << " detected for "
732+ << Utility ::enum_to_string (elem .type ())
733+ << " in Exodus file "
734+ << exio_helper -> current_filename );
724735
725736 // Add this (elem,side,id) triplet to the BoundaryInfo object.
726737 mesh .get_boundary_info ().add_side (libmesh_elem_id ,
0 commit comments