Update of /cvsroot/jtoolkit/jToolkit/widgets
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29055
Modified Files:
chart.py
Log Message:
Updated a few exception handling parts
Index: chart.py
===================================================================
RCS file: /cvsroot/jtoolkit/jToolkit/widgets/chart.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** chart.py 10 Feb 2004 09:22:51 -0000 1.22
--- chart.py 10 Feb 2004 09:23:17 -0000 1.23
***************
*** 8,11 ****
--- 8,12 ----
from jToolkit.data import dates
import random, os
+ import traceback
#We need this lock for gdchart, as it's not thread-safe
***************
*** 69,73 ****
except:
(etype, evalue, trace) = sys.exc_info()
! print "Temp file error:",etype,evalue
return img
--- 70,74 ----
except:
(etype, evalue, trace) = sys.exc_info()
! # print "Temp file error:",etype,evalue
return img
***************
*** 76,86 ****
try:
self.drawimage()
- img = self.getimagefromtempfile()
except:
(etype, evalue, trace) = sys.exc_info()
print "Unexpected Error:",etype,evalue
# gdchartLock.release()
return None
# gdchartLock.release()
return img
--- 77,88 ----
try:
self.drawimage()
except:
(etype, evalue, trace) = sys.exc_info()
print "Unexpected Error:",etype,evalue
+ traceback.print_tb(trace)
# gdchartLock.release()
return None
# gdchartLock.release()
+ img = self.getimagefromtempfile()
return img
***************
*** 142,146 ****
if xDataLen % testnum == 0:
numLabels = testnum+1
!
#Otherwise go for max
if not numLabels: numLabels = 10
--- 144,148 ----
if xDataLen % testnum == 0:
numLabels = testnum+1
!
#Otherwise go for max
if not numLabels: numLabels = 10
***************
*** 165,169 ****
#Draw a legend
self.figure.get_current_axis().legend(self.legendlabels,2)
-
class CurrentValueLegendChart(Chart):
--- 167,170 ----
|