INNER CODE UNIT · Python
CommandError
renezander030/capcut-cli · python/capcut/__init__.py:88
class CommandError(CapcutError):
"""The command exited non-zero. ``result`` carries status, streams and parsed JSON."""
def __init__(self, result: Result):
self.result = result
message = result.error or result.stderr.strip() or result.stdout.strip() or f"exit {result.status}"
super().__init__(f"capcut {result.cmd} failed (exit {result.status}): {message}")
@property
def status(self) -> int:
return self.result.status
@property
def data(self) -> Any:
return self.result.data
@property
def stdout(self) -> str: