At it stands, when serialise() is called when a transaction is committed (tx.commit()), we assume that the serialisation cannot fail (or if it does, we throw a specific error that should be caught by the caller (i.e. frontend.h) to abort the processing of transactions immediately.
Instead, we should recover safely, e.g. rolling back the store to the before the transaction was committed and returning a specific error message.
At it stands, when
serialise()is called when a transaction is committed (tx.commit()), we assume that the serialisation cannot fail (or if it does, we throw a specific error that should be caught by the caller (i.e.frontend.h) to abort the processing of transactions immediately.Instead, we should recover safely, e.g. rolling back the store to the before the transaction was committed and returning a specific error message.