Gregory Piñero
2006-01-10 16:30:59 UTC
Hi guys,
This is a silly question but how do I capture a com_error from another
module? Below is the code I'm trying but it's not working. I get
this error:
Traceback (most recent call last):
...
except com_error:
NameError: name 'com_error' is not defined
<code>
import module_that_uses_com
try:
module_that_uses_com.main(False) #Production
except com_error:
#sometimes QB throws an error for no good reason
#so many times if we wait it gets better.
#>Is this the correct error to capture?
time.sleep(600) #10 min
module_that_uses_com.main(False)
</code>
Much thanks!
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
This is a silly question but how do I capture a com_error from another
module? Below is the code I'm trying but it's not working. I get
this error:
Traceback (most recent call last):
...
except com_error:
NameError: name 'com_error' is not defined
<code>
import module_that_uses_com
try:
module_that_uses_com.main(False) #Production
except com_error:
#sometimes QB throws an error for no good reason
#so many times if we wait it gets better.
#>Is this the correct error to capture?
time.sleep(600) #10 min
module_that_uses_com.main(False)
</code>
Much thanks!
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)