gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: jakarta-gump/python gumpcore.py gumputil.py
Date Thu, 24 Apr 2003 08:34:15 GMT
nicolaken    2003/04/24 01:34:15

  Modified:    python   gumpcore.py gumputil.py
  Log:
  Unify error reporting layout in a util method.
  
  Revision  Changes    Path
  1.3       +8 -6      jakarta-gump/python/gumpcore.py
  
  Index: gumpcore.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gumpcore.py,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- gumpcore.py	24 Apr 2003 08:22:50 -0000	1.2
  +++ gumpcore.py	24 Apr 2003 08:34:14 -0000	1.3
  @@ -34,12 +34,14 @@
   
   def load(file):
     if not os.path.exists(file):
  -    print
  -    print 'You need to specify a valid workspace for Gump to run'
  -    print 'If you are new to Gump, simply copy minimal-workspace.xml'
  -    print ' to a file with the name of your computer (mycomputer.xml)'
  -    print ' and rerun this program.'
  -    print
  +    gumpMessage('Error',
  +                'workspace '+file+' not found',
  +                '  You need to specify a valid workspace for Gump to run\n'
  +                '  If you are new to Gump, simply copy minimal-workspace.xml\n'
  +                '  to a file with the name of your computer (mycomputer.xml)\n'
  +                '  and rerun this program.'
  +                )
  +
       raise IOError, 'workspace '+file+' not found'
       
     workspace=SAXDispatcher(file,'workspace',Workspace).docElement
  
  
  
  1.2       +17 -0     jakarta-gump/python/gumputil.py
  
  Index: gumputil.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gumputil.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- gumputil.py	23 Apr 2003 12:27:20 -0000	1.1
  +++ gumputil.py	24 Apr 2003 08:34:15 -0000	1.2
  @@ -38,3 +38,20 @@
         if debug: print '...done' 
   
     return newHref
  +
  +# display an error message in standard formatting
  +def gumpMessage(type, error, description):
  +  print
  +  print
  +  print ' ****************************************************************'
  +  print '     ',type
  +  print ' ****************************************************************'
  +  print ' **                                                            **'
  +  print '   ',error
  +  print
  +  print description
  +  print
  +  print ' **                                                            **'
  +  print ' ****************************************************************'
  +  print
  +  print
  
  
  

Mime
View raw message