forked from bartvdbraak/blender
don't raise exceptions on some errors unless debugging
This commit is contained in:
parent
5296928728
commit
fc12ec2317
@ -1076,6 +1076,9 @@ class vrmlNode(object):
|
|||||||
# print self.id
|
# print self.id
|
||||||
ok = True
|
ok = True
|
||||||
while ok:
|
while ok:
|
||||||
|
if i>=len(lines):
|
||||||
|
return len(lines)-1
|
||||||
|
|
||||||
l = lines[i]
|
l = lines[i]
|
||||||
# print '\tDEBUG:', i, self.node_type, l
|
# print '\tDEBUG:', i, self.node_type, l
|
||||||
if l=='':
|
if l=='':
|
||||||
@ -1085,13 +1088,15 @@ class vrmlNode(object):
|
|||||||
if l=='}':
|
if l=='}':
|
||||||
if self.node_type != NODE_NORMAL: # also ends proto nodes, we may want a type for these too.
|
if self.node_type != NODE_NORMAL: # also ends proto nodes, we may want a type for these too.
|
||||||
print 'wrong node ending, expected an } ' + str(i) + ' ' + str(self.node_type)
|
print 'wrong node ending, expected an } ' + str(i) + ' ' + str(self.node_type)
|
||||||
raise ValueError
|
if DEBUG:
|
||||||
|
raise ValueError
|
||||||
### print "returning", i
|
### print "returning", i
|
||||||
return i+1
|
return i+1
|
||||||
if l==']':
|
if l==']':
|
||||||
if self.node_type != NODE_ARRAY:
|
if self.node_type != NODE_ARRAY:
|
||||||
print 'wrong node ending, expected a ] ' + str(i) + ' ' + str(self.node_type)
|
print 'wrong node ending, expected a ] ' + str(i) + ' ' + str(self.node_type)
|
||||||
raise ValueError
|
if DEBUG:
|
||||||
|
raise ValueError
|
||||||
### print "returning", i
|
### print "returning", i
|
||||||
return i+1
|
return i+1
|
||||||
|
|
||||||
@ -2567,12 +2572,12 @@ def test():
|
|||||||
files.sort()
|
files.sort()
|
||||||
tot = len(files)
|
tot = len(files)
|
||||||
for i, f in enumerate(files):
|
for i, f in enumerate(files):
|
||||||
#if i < 126 or i > 1000000:
|
if i < 124 or i > 1000000:
|
||||||
# continue
|
|
||||||
|
|
||||||
if i != 1068:
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
#if i != 1068:
|
||||||
|
# continue
|
||||||
|
|
||||||
#if i != 12686:
|
#if i != 12686:
|
||||||
# continue
|
# continue
|
||||||
|
|
||||||
@ -2583,4 +2588,4 @@ def test():
|
|||||||
# Window.
|
# Window.
|
||||||
load_web3d(f, PREF_FLAT=True)
|
load_web3d(f, PREF_FLAT=True)
|
||||||
|
|
||||||
|
# test()
|
||||||
|
Loading…
Reference in New Issue
Block a user