-
Notifications
You must be signed in to change notification settings - Fork 82
Description
Currently in read_mesh in vital/io/mesh_io.cxx, if the filename parameter does not end with a valid file extension (.ply2, .ply, or .obj), the function still returns the uninitialized mesh_sptr, when it should throw an exception indicating the bad input.
Outside of the function itself, the only reference to this code that would need to be updated as far as I can tell is in vital/tests/test_mesh_io.cxx.
All other read_ functions in the file are also lacking any exceptions, and don't verify that the input files are properly structured. In the case that a file is incorrectly formatted, they will also still return a mesh_sptr, which may be uninitialized or otherwise improperly formed. There should be verification that the input files are formatted correctly, and exceptions should be thrown if they are not.