help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Error handling/checking, exceptions in general


From: Peter Schuller
Subject: Re: [Help-smalltalk] Error handling/checking, exceptions in general
Date: 21 Dec 2002 16:00:01 +0100

> > At first I figured #isPeerAlive would do it, but it doesn't.
> 
> It should be an error if the socket cannot be connected... though I don't
> remember the exact semantics because connect does not block.  I'll let you
> know, but after Christmas.

Have a nice one!

> > And btw, in general. Suppose I came up with a few patches for improving
> > the exception hierarchy and error handling in general, would it be of
> > interest? I'm not saying I will because I can't promise that, but if I
> > were.
> 
> Of course it depends on the patch :-) however I say it can be done as long
> as it does not break ANSI compliancy.

I have to admit that I'm not too read up on how much the ANSI standard
dictates. Is the standard available online somewhere?

> > [ ... do some network i/o ... ]
> > on: NetworkException
> > do: [ ... ].
> 
> This is in my to-do list, though it is broken enough that I have not done it
> yet.  It is as simple as "Error subclass: #NetworkException" and then
> replacing "self error" with "NetworkException signal".

Right, that's basically all I'm after. Nothing more advanced than that.
The difficult part is probably to find all the places where exceptions
are thrown, figure out which type of exception is best thrown, and then
update the documentation for all affected methods. I.e., it's mostly
mechanical work after a suitable exception hiearchy is decided on.

> Only, you'll have to sign papers.  They'll arrive at your home if you
> privately mail me your snail address.

Not a problem although I must admin you have totally lost me here :) Why
would submitting patches to GNU Smalltalk require signing papers?

> > This requires a proper exception hierarchy and documentation of what
> > exceptions may be thrown and in which circumstances.
> 
> At least at start use a single exception; then add more.  See
> kernel/AnsiExcept.st for an example.

I figured I start by doing something to the parts that I am currently
interested in, and then proceed from there.

Btw, is there a public CVS/SVN/whatever repository, or are the tarballs
the authorative source?

-- 
/ Peter Schuller, InfiDyne Technologies HB

PGP userID: 0xE9758B7D or 'Peter Schuller <address@hidden>'
Key retrival: Send an E-Mail to address@hidden
E-Mail: address@hidden Web: http://www.scode.org







reply via email to

[Prev in Thread] Current Thread [Next in Thread]