catch all exceptions from calls to filters to avoid crash system reports
This commit is contained in:
parent
bb55728c49
commit
fdf3ee9414
@ -101,17 +101,27 @@ class RclExecM:
|
|||||||
|
|
||||||
# If we're given a file name, open it.
|
# If we're given a file name, open it.
|
||||||
if len(params["filename:"]) != 0:
|
if len(params["filename:"]) != 0:
|
||||||
if not processor.openfile(params):
|
try:
|
||||||
|
if not processor.openfile(params):
|
||||||
|
self.answer("", "", iserror = RclExecM.fileerror)
|
||||||
|
return
|
||||||
|
except Exception, err:
|
||||||
|
self.em.rclog("processmessage: openfile raised: [%s]" % err)
|
||||||
self.answer("", "", iserror = RclExecM.fileerror)
|
self.answer("", "", iserror = RclExecM.fileerror)
|
||||||
return
|
return
|
||||||
|
|
||||||
# If we have an ipath, that's what we look for, else ask for next entry
|
# If we have an ipath, that's what we look for, else ask for next entry
|
||||||
ipath = ""
|
ipath = ""
|
||||||
self.mimetype = ""
|
self.mimetype = ""
|
||||||
if params.has_key("ipath:") and len(params["ipath:"]):
|
try:
|
||||||
ok, data, ipath, eof = processor.getipath(params)
|
if params.has_key("ipath:") and len(params["ipath:"]):
|
||||||
else:
|
ok, data, ipath, eof = processor.getipath(params)
|
||||||
ok, data, ipath, eof = processor.getnext(params)
|
else:
|
||||||
|
ok, data, ipath, eof = processor.getnext(params)
|
||||||
|
except Exception, err:
|
||||||
|
self.answer("", "", eof, RclExecM.fileerror)
|
||||||
|
return
|
||||||
|
|
||||||
#self.rclog("processmessage: ok %s eof %s ipath %s"%(ok, eof, ipath))
|
#self.rclog("processmessage: ok %s eof %s ipath %s"%(ok, eof, ipath))
|
||||||
if ok:
|
if ok:
|
||||||
self.answer(data, ipath, eof)
|
self.answer(data, ipath, eof)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user