On Thu, Aug 21, 2008 at 08:46:57AM +0200, spaetz wrote: > Matthias Julius wrote: > > In the mean time I was so annoyed by the lack of a decent exception > > handling in Perl that I was almost ready to re-implement the whole > > thing in Python (which would also have the potential advantage that > > some code could be shared between the server and the client). > > I have the zipping and uploading code ready in python if you need > it. It's even threaded already :-). You just need to plug in the magic > rendering part. > I somewhat dislike introducing new perl dependencies (make installation ever > more difficult), that's part of what makes python so charming. "It > comes with batteries included". But seriously, we depend on perl for > or/p and preprocessing, so it would not make sense to use another > language (except if you would also provide or/py ;-) ). Besides, > deelkar is not very comfortable in python, I believe.
I think occasionally adding new dependencies are something we just
have to live with, coding perl without adding a CPAN module every so
often means you spend lots of time reinventing wheels.
After all the time I've spent trying to figure out what extra python
package something needs I don't see where python is in any way better
than perl in this regard.
> > But, after that I found the Error module on CPAN which implements this
> > and I want to give it a try if nobody objects.
Unless somebody sets their foot down and say we really don't want to
do this I was going to introduce a dependency on this, plus a few
other modules, when doing my refactoring of svg2png.
> What exactly is it that perl::Error gives us? One thing that strikes
> me as insufficient currently, is that a CTRL-C in inskscape (or or/p)
> will hand back jobs as "BadSVG" or "RenderFailure", which is very
> misleading. But I think we are able to capture those exceptions with
> perl standard means, perhaps others no more about that. It would be
> great if we could hand back a job as "UserAborted" rather than
> misleading error messages.
Error.pm gives perl proper exception handling, in a much cleaner way
than eval{}.
I think we could catch SIGINT with a handler that throws an exception
that could then be catched and reported to the server as UserAborted.
--
Knut Arne Bjørndal
aka Bob Kåre
[EMAIL PROTECTED]
[EMAIL PROTECTED]
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Tilesathome mailing list [email protected] http://lists.openstreetmap.org/listinfo/tilesathome
