ppt-dump: improve error messages
This commit is contained in:
parent
25271db690
commit
cada24896f
@ -53,7 +53,7 @@ class PPTDumper(object):
|
|||||||
try:
|
try:
|
||||||
dirstrm = strm.getDirectoryStreamByName(dirname)
|
dirstrm = strm.getDirectoryStreamByName(dirname)
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
error("getDirectoryStreamByName(%s): %s\n" % (dirname,str(err)))
|
error("getDirectoryStreamByName(%s): %s - %s\n" % (dirname,str(err),self.filepath))
|
||||||
# The previous version was killed by the exception
|
# The previous version was killed by the exception
|
||||||
# here, so the equivalent is to break, but maybe there
|
# here, so the equivalent is to break, but maybe there
|
||||||
# is no reason to do so.
|
# is no reason to do so.
|
||||||
@ -119,9 +119,9 @@ def main (args):
|
|||||||
try:
|
try:
|
||||||
dumper = PPTDumper(args[0], globals.params)
|
dumper = PPTDumper(args[0], globals.params)
|
||||||
if not dumper.dump():
|
if not dumper.dump():
|
||||||
error("ppt-dump: dump error\n")
|
error("ppt-dump: dump error " + args[0] + "\n")
|
||||||
except:
|
except:
|
||||||
error("ppt-dump: FAILURE (bad format?)\n")
|
error("ppt-dump: FAILURE (bad format?) " + args[0] + "\n")
|
||||||
|
|
||||||
if globals.params.dumpText:
|
if globals.params.dumpText:
|
||||||
print(globals.textdump.replace("\r", "\n"))
|
print(globals.textdump.replace("\r", "\n"))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user