raise an exception for this error
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -170,6 +170,12 @@ class MissingDependencyException(Exception):
|
||||
class EmptyError(Exception):
|
||||
pass
|
||||
|
||||
class MissingFrames(Exception):
|
||||
"""
|
||||
Less frames decoded than expected.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
def shrinkPath(path):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user