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

RE: Re: svn commit: rev 248 - trunk/subversion/tests/clients/cmdline/svntest

From: Bill Tutt <rassilon_at_lyra.org>
Date: 2001-10-17 16:32:47 CEST

Of course there is!

See the docs on the traceback module. There's a routine or two related
to printing tracebacks.

FYI,
Bill

-----Original Message-----
From: Ben Collins-Sussman [mailto:sussman@collab.net]
Sent: Wednesday, October 17, 2001 6:25 AM
To: Greg Stein
Cc: dev@subversion.tigris.org
Subject: Re: svn commit: rev 248 -
trunk/subversion/tests/clients/cmdline/svntest

Greg Stein <gstein@lyra.org> writes:

> I don't know the code here, but I'd recommend thinking things through
a
> *few* times if you ever find yourself using "except:"

Well, here's the scenario.

The main python routine loops over a list of tests, and runs each one.
It does this by repeatedly calling a subroutine that executes exactly
one test (a particular test number). This subroutine's job is to
return a 1 or 0 to the main routine, indicating whether the test
passed or failed. In the end, the main python routine remembers
whether any tests failed.

The problem is that we've defined particular kinds of execptions --
SVNTreeUnequal, and others. Sometimes our code explicitly raises
them. When this happens, python bombs out completely. We'd rather
just have the test return an error code instead, so the next tests
will run.

So... should we simply be looking to trap a list of *particular*
exceptions? Like all those that our code might be expected tot throw?
And also, is there a way to catch an exception and *still* print the
traceback before returning an error value?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:44 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.