vtk error handling is not very helpful
This commit is contained in:
parent
86dfb58732
commit
c74e57f225
|
@ -1,3 +1,4 @@
|
||||||
|
import os
|
||||||
import multiprocessing as mp
|
import multiprocessing as mp
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
@ -165,6 +166,9 @@ class VTK:
|
||||||
else:
|
else:
|
||||||
raise TypeError(f'Unknown file extension {ext}')
|
raise TypeError(f'Unknown file extension {ext}')
|
||||||
|
|
||||||
|
if not os.path.isfile(fname):
|
||||||
|
raise FileNotFoundError(f'No such file: {fname}')
|
||||||
|
|
||||||
reader.SetFileName(str(fname))
|
reader.SetFileName(str(fname))
|
||||||
reader.Update()
|
reader.Update()
|
||||||
vtk_data = reader.GetOutput()
|
vtk_data = reader.GetOutput()
|
||||||
|
|
Loading…
Reference in New Issue