Tracking records that could not be processed¶
The NotCompleted
object¶
NotCompleted
is a special result type that can be produced by a composable app. These objects evaluate to False
.
An app can return a NotCompleted
result for one of 2 reasons. The object contains information regarding the input data, where the issue arose and whatever message was provided by the code (like an exception traceback).
NotCompleted
FALSE type¶
The results when a condition was not met. For example, below I create an app that will return alignments with 2 specific sequences. I’m applying this to a data set where a “Mouse” sequence does not exist. This will produce a FALSE type.
The NotCompleted
instance has attributes identifying what data failed,
where the failure occurred
and the reason for the failure
NotCompleted
ERROR type¶
An ERROR
type is returned if an unexpected condition occurs. This can be an exception raised during the calculation. In our example, we illustrate this by trying to open a file with an incorrect path.
Composed functions propagate NotCompleted
results¶
If you have a composed function, with multiple steps and an error occurs then the resulting NotCompleted
result is returned without any of the other steps being applied to it. For example, we make a composed app from both of the above apps.
and