try-except around particle load

This commit is contained in:
cxgeorge 2002-10-28 21:44:10 +00:00
parent 36853fa4c3
commit 2a4eed754c

View File

@ -204,10 +204,13 @@ class ParticleEffect(NodePath):
def loadConfig(self, filename):
"""loadConfig(filename)"""
if vfs:
exec vfs.readFile(filename)
else:
execfile(filename.toOsSpecific())
try:
if vfs:
exec vfs.readFile(filename)
else:
execfile(filename.toOsSpecific())
except:
self.notify.error('loadConfig: failed to load particle file: '+filename)