raise an exception for this error

This commit is contained in:
Thomas Vander Stichele
2013-01-18 19:23:52 +01:00
parent daf705ab46
commit 0735c716d1
2 changed files with 10 additions and 1 deletions

View File

@@ -163,8 +163,11 @@ class ChecksumTask(log.Loggable, gstreamer.GstPipelineTask):
self.debug("checksum: %08X", self._checksum)
self.debug("bytes: %d", self._bytes)
if self._frameEnd != last:
print 'ERROR: did not get all frames, %d of %d missing' % (
msg = 'did not get all frames, %d of %d missing' % (
self._frameEnd - last, self._frameEnd)
self.warning(msg)
self.setException(common.MissingFrames(msg))
return
self.checksum = self._checksum

View File

@@ -170,6 +170,12 @@ class MissingDependencyException(Exception):
class EmptyError(Exception):
pass
class MissingFrames(Exception):
"""
Less frames decoded than expected.
"""
pass
def shrinkPath(path):
"""