[cig-commits] r5313 - in cs/pythia/trunk: . pyre/inventory
leif at geodynamics.org
leif at geodynamics.org
Thu Nov 16 21:19:38 PST 2006
Author: leif
Date: 2006-11-16 21:19:38 -0800 (Thu, 16 Nov 2006)
New Revision: 5313
Removed:
cs/pythia/trunk/MANIFEST.in
Modified:
cs/pythia/trunk/pyre/inventory/Inventory.py
Log:
Improve error reporting when an exception occurs within the
Pyre application itself while calling the factory method to
get the default Component for a facility.
This appeared as:
>> default::
>> pyre.inventory(error)
-- name 'pyre' is not defined
Now reported as:
>> /home/lstrand/dv/CitcomS/CitcomS/Components/Output.py:58:
>> pyre.inventory(error)
-- name 'pyre' is not defined
(This is from a bug in CitcomS/trunk at r5312.)
Also, deleted MANIFEST.in (no longer needed).
Deleted: cs/pythia/trunk/MANIFEST.in
===================================================================
--- cs/pythia/trunk/MANIFEST.in 2006-11-17 04:26:11 UTC (rev 5312)
+++ cs/pythia/trunk/MANIFEST.in 2006-11-17 05:19:38 UTC (rev 5313)
@@ -1 +0,0 @@
-include ez_setup.py
Modified: cs/pythia/trunk/pyre/inventory/Inventory.py
===================================================================
--- cs/pythia/trunk/pyre/inventory/Inventory.py 2006-11-17 04:26:11 UTC (rev 5312)
+++ cs/pythia/trunk/pyre/inventory/Inventory.py 2006-11-17 05:19:38 UTC (rev 5313)
@@ -331,15 +331,15 @@
candidates = []
- import pyre.parsing.locators
- locator = pyre.parsing.locators.default()
-
for name, facility in self._facilityRegistry.iteritems():
try:
component = facility.__get__(self)
candidates.append(component)
except Exception, error:
if context:
+ import sys, traceback, pyre.parsing.locators
+ file, line, function, text = traceback.extract_tb(sys.exc_info()[2])[-1]
+ locator = pyre.parsing.locators.script(file, line, function)
context.error(error, name, None, locator)
else:
raise
More information about the cig-commits
mailing list