Mercurial > touhou
comparison pytouhou/ui/music.py @ 377:70e2ed71b09c
Add meaningful exceptions in format parsing.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 29 Aug 2012 18:34:28 +0200 |
parents | f305cdd6f6c5 |
children | e0e284fcb288 |
comparison
equal
deleted
inserted
replaced
376:69ec72b990a4 | 377:70e2ed71b09c |
---|---|
30 | 30 |
31 self._start = self.audio_format.bytes_per_sample * start | 31 self._start = self.audio_format.bytes_per_sample * start |
32 self._end = self.audio_format.bytes_per_sample * end | 32 self._end = self.audio_format.bytes_per_sample * end |
33 | 33 |
34 if self._end > self._max_offset: | 34 if self._end > self._max_offset: |
35 raise Exception #TODO | 35 raise Exception('Music ends after the end of the file.') |
36 | 36 |
37 self._duration = None | 37 self._duration = None |
38 | 38 |
39 | 39 |
40 def _get_audio_data(self, bytes): | 40 def _get_audio_data(self, bytes): |