(I am interested mostly in Unmanaged mode, but maybe there is no difference with Managed)
I am mostly interested in handling most common problems like these 3:
- ErrorCode.UnableToCancelOrder
- ErrorCode.UnableToChangeOrder
- ErrorCode.UnableToSubmitOrder
Is it good approach to check until OrderState.Rejected is detected and only after then investigate the error variable?
Or should I check the error variable everytime and everywhere I do something with order? I hope not - and there is some mechanism, that notifies, that something is wrong with the Order.
Or is there some another recommended approach?
The problem is - that I cannot see the big picture of handling errors - how it is designed to be done under common circumstances.
I see 2 channels, that can report some potential problem, but do not see the relation between the OrderState(s) and Order#error..
- 1. some problems with Order can be detected from OrderState (like OrderState.Rejected or OrderState.Unknown)
- 2. some problems with Order can be detected Order#error variable.
Are the 2 abovementioned ways of reporting problems completely unrelated or is there some direct relation? - for example like: "if Order gets into State.Rejected or State.Unknown -> then variable error should be investigated for more details about the problem."
I just cannot imagine, that evewhere and everytime we interact with Order, we should investigate potential problems. It should work like we do not need to look for problems with Order, until we are notified about the problem.
Comment