Improve processing errors

Continuing the discussion from Make sale warehouse not required until processing:

I agree with albert here that this is currently an issue as the user will not now that we failed to process a sale or not due to a missing configuration.

I’m wondering if it won’t be better to mark the sale as processing in case of error but set the shipment/invoice state to exception to let him know where the problem is.

There will be a side effect of this behaviour: currently on a sale with both shipment and invoice methods set to order the shipment is not created when there is a missing account. If we split the process (which is required to have two separate exceptions) we should be able to correctly create the shipment when there is some error creating the invoice.

This does not look correct to me because there is no exception to handle. We can not change the meaning of the state for convenience.

More over it is technically impossible nor correct to update record if any exception occurs. This may break the integrity of the data or commit third party transaction.