(Post-processing is referred to as "cleanup" presently.)
Rendering the html output
+ The get_data, factory, and cleanup have two possible ways to report errors.
+ They can raise an exception or raise the "special" exception
+ MultiError.
+
Attributes:
request A pyramid request instance
uf An UploadForm instance
'''
Validate input needed beyond that required to connect to the db.
+ Returns a list of exceptions
+
Note that this occurs after read() is called.
This is expected to be replaced by it's subclass.
'''
Called after all lines are processed to do any final
updates to the db.
+
+ May raise a single exception or may save multiple exceptions
+ and raise MultiError.
'''
pass
'''
Takes an UploadEngine instance
Returns a DataLineProcessor instance
+ May raise a single exception or MultiError.
'''
raise NotImplementedError
# (Cannot call uh until after self is fully
# initalized, including self.cur.)
processor = self.uh.factory(self)
+ except core_ex.MultiError as ex:
+ errors.extend(ex.errors)
except core_ex.Error as ex:
errors.append(ex)
else:
# Let upload handler finish
try:
self.uh.cleanup()
+ except core_ex.MultiError as ex:
+ errors.extend(ex.errors)
except core_ex.UploadError as ex:
errors.append(ex)
finally: