mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-01 15:58:36 +02:00
[cameraInit] improve error reporting when build intrinsics fails
* immediately raise if subprocess returns with an error code (avoid misleading error trying to open non-existing '.sfm' file) * include error code and command line in the exception's message in such case * avoid duplicate log message
This commit is contained in:
parent
d5d8fa77dc
commit
e3246cc229
1 changed files with 3 additions and 2 deletions
|
@ -129,7 +129,9 @@ class CameraInit(desc.CommandLineNode):
|
|||
stdout, stderr = subprocess.communicate()
|
||||
subprocess.wait()
|
||||
if subprocess.returncode != 0:
|
||||
logging.warning('CameraInit: Error on buildIntrinsics of node "{}".'.format(node.name))
|
||||
raise RuntimeError('CameraInit failed with error code {}. Command was: "{}"'.format(
|
||||
subprocess.returncode, cmd)
|
||||
)
|
||||
|
||||
# Reload result of aliceVision_cameraInit
|
||||
cameraInitSfM = node.output.value
|
||||
|
@ -152,7 +154,6 @@ class CameraInit(desc.CommandLineNode):
|
|||
return views, intrinsics
|
||||
|
||||
except Exception:
|
||||
logging.warning('CameraInit: Error on buildIntrinsics of node "{}".'.format(node.name))
|
||||
raise
|
||||
finally:
|
||||
node._cmdVars = origCmdVars
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue