Except for a couple of functions that do not return Result_t all other functions do and it does not make any sense to have statements like this one
if (result.Failure()) {
throw Kumu::RuntimeError(result);
}
when all that is required is to just return result;
Such functions like OP1Header() and RIP() could return empty respective structures in case of invalid state. If it is better to detect error state and interrupt processing, these functions could be converted to the following signatures:
Except for a couple of functions that do not return Result_t all other functions do and it does not make any sense to have statements like this one
if (result.Failure()) { throw Kumu::RuntimeError(result); } when all that is required is to just return result;
Such functions like OP1Header() and RIP() could return empty respective structures in case of invalid state. If it is better to detect error state and interrupt processing, these functions could be converted to the following signatures:
From:
virtual const ASDCP::MXF::RIP& RIP() const; virtual const ASDCP::MXF::OP1aHeader& OP1aHeader() const;
To:
virtual Result_t RIP(ASDCP::MXF::RIP&) const; virtual Result_t OP1aHeader(ASDCP::MXF::OP1aHeader&) const;
Otherwise, RuntimeError should not use used.