[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] fix exception running gen-make.py

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Sun, 18 Aug 2013 17:09:26 +0300

Masaru Tsuchiyama wrote on Sun, Aug 18, 2013 at 22:58:09 +0900:
>> To further explain this consideration: even if both existence and
>> permissions were checked, the code would *still* be wrong if args[0]
>> were a directory. If an .isdir() check were added, the code would
>> still be wrong if args[0] were a dangling symlink. And so on.
>> Calling open() will detect all those potential problems.
> Thank you for the commit.
> But I think you should catch a exception which parser.readfp() throws,
> and print approprite error mesage.

.readfp() doesn't throw an exception. It's __builtins__.open() that does.

> I think Users who don't know Python prefer an well-formatted
> error message to stack trace.

I don't have a preference among those.


Received on 2013-08-18 16:10:05 CEST

This is an archived mail posted to the Subversion Dev mailing list.