polishing of error message styles
This commit is contained in:
parent
e2d1ffe7b8
commit
a8898163ce
|
@ -218,7 +218,7 @@ class VTK:
|
||||||
reader = vtk.vtkGenericDataObjectReader()
|
reader = vtk.vtkGenericDataObjectReader()
|
||||||
reader.SetFileName(str(fname))
|
reader.SetFileName(str(fname))
|
||||||
if dataset_type is None:
|
if dataset_type is None:
|
||||||
raise TypeError('Dataset type for *.vtk file not given.')
|
raise TypeError('Dataset type for *.vtk file not given')
|
||||||
elif dataset_type.lower().endswith(('imagedata','image_data')):
|
elif dataset_type.lower().endswith(('imagedata','image_data')):
|
||||||
reader.Update()
|
reader.Update()
|
||||||
vtk_data = reader.GetStructuredPointsOutput()
|
vtk_data = reader.GetStructuredPointsOutput()
|
||||||
|
@ -232,7 +232,7 @@ class VTK:
|
||||||
reader.Update()
|
reader.Update()
|
||||||
vtk_data = reader.GetPolyDataOutput()
|
vtk_data = reader.GetPolyDataOutput()
|
||||||
else:
|
else:
|
||||||
raise TypeError(f'Unknown dataset type {dataset_type} for vtk file')
|
raise TypeError(f'Unknown dataset type "{dataset_type}" for vtk file')
|
||||||
else:
|
else:
|
||||||
if ext == '.vti':
|
if ext == '.vti':
|
||||||
reader = vtk.vtkXMLImageDataReader()
|
reader = vtk.vtkXMLImageDataReader()
|
||||||
|
@ -243,7 +243,7 @@ class VTK:
|
||||||
elif ext == '.vtp':
|
elif ext == '.vtp':
|
||||||
reader = vtk.vtkXMLPolyDataReader()
|
reader = vtk.vtkXMLPolyDataReader()
|
||||||
else:
|
else:
|
||||||
raise TypeError(f'Unknown file extension {ext}')
|
raise TypeError(f'Unknown file extension "{ext}"')
|
||||||
|
|
||||||
reader.SetFileName(str(fname))
|
reader.SetFileName(str(fname))
|
||||||
reader.Update()
|
reader.Update()
|
||||||
|
|
Loading…
Reference in New Issue