From: Jochen V. <vo...@se...> - 2004-11-19 16:30:40
|
Hello, On Fri, Nov 19, 2004 at 09:23:36AM -0600, John Hunter wrote: > In summary, the thought is >=20 > * use verbose only for non-error reporting >=20 > * use exceptions for all error reporting I agree with this. > * work some GUI magic to transparently get the errors forwarded to a > dialog box w/o using special functions Here I have no opinion until I understand the special kind of magic which is going to be used here. > For another, it would also require some > caching of messages because if 30 messages generate 30 popups it will > get annoying quick. Yes, we have to be careful here. As nobody objected to this part of the plan, I changed the PostScript backend in CVS as follows: diff -u -r1.13 backend_ps.py --- backend_ps.py 13 Nov 2004 11:41:54 -0000 1.13 +++ backend_ps.py 19 Nov 2004 16:23:13 -0000 @@ -529,10 +529,7 @@ basename, ext =3D os.path.splitext(outfile) if not ext: outfile +=3D '.ps' isEPSF =3D ext.lower().startswith('.ep') - try: - fh =3D file(outfile, 'w') - except IOError: - error_msg_ps('Could not open %s for writing' % outfile) + fh =3D file(outfile, 'w') needsClose =3D True title =3D outfile Slight problem: it might now be a little bit more difficult to include the name of the file which could not be opened in the error message. The IOError exception will probably only have "permission denied" associated with it. All the best, Jochen --=20 http://seehuhn.de/ |