Skip to content
Snippets Groups Projects

Suppress exception when mapping field of unknown type

Merged Kenneth Moreland requested to merge kmorel/vtk-m:no-error-on-cast-map-fail into master
  1. Aug 31, 2021
    • Kenneth Moreland's avatar
      Suppress exception when mapping field of unknown type · 546dd608
      Kenneth Moreland authored
      By default, the `FilterDataSet` class will iterate over all fields and
      use `CastAndCall` on each one to call the subclass' mapping function
      with the appropriate array type.
      
      This only works if the array is of a known type. If it is not
      `CastAndCall` throws an exception. However, having the entire filter
      exception out just because one field cannot be converted does not make
      sense. Instead, catch the exception, log a warning, and drop the field.
      546dd608
Loading