devserver: fix exception related discrepancies

* DeltaPayloadsArtifact._Setup() neglected to (re-)raise and exception
  when an error occurred. This contradicts the docstring and a likely
  cause for inconsistencies surrounding missing artifact files.

* BuildArtifact.Process() caught and re-raised any exception, although
  it's only supposed to be raising BuildArtifactError. We now convert
  any unknown exception into the latter (albeit losing the stack trace).
  This necessitates that we adjust our handling of exception at call
  sites for build_artifact, too.

TEST=Unit tests.

Change-Id: I30a87e9722460fdbfab54c3ff60e1d7a8013b3cb
Tested-by: Gilad Arnold <>
Reviewed-by: Dan Shi <>
3 files changed