On Mon, Jan 06, 2003 at 03:21:37PM +0000, Dick Porter wrote:
> On Sat, 2003-01-04 at 09:17, [EMAIL PROTECTED] wrote:
> > On Fri, Jan 03, 2003 at 08:03:50PM -0500, Miguel de Icaza wrote:
> > >   * This pattern:
> > > 
> > > -                 int ms=Convert.ToInt32(timeout.TotalMilliseconds);
> > > +                 double ms = timeout.TotalMilliseconds;
> > > 
> > >     But I am not sure about what this does, or why the change was needed
> > >   
> > >   * This other:
> > > 
> > > -                 // FIXME when I understand what a
> > > -                 // "synchronisation domain" is and does
> > > -                 return(false);
> > > +                 return Wait(obj,msi,exitContext);
> 
> > The first change is about converting timeout.TotalMilliseconds from
> > double to int32 without checking if that number (in the double format)
> > can be represented with a int32 format. I think that the best way to
> > have control about the exceptions thrown when the function gets a double
> > greather than Int32.MaxValue.
> 
> The correct fix here is to catch overflow exceptions, rather than change
> the variable to a double (because its just going to be given to another
> method that's expecting an int.)
Yes I know what you say and the int value is in "msi" variable. First I
get a double, check the range and then convert it to int (into msi).

> 
> > 
> > The second change does not correct the "FIXME" because that method
> > depends on Wait(obj,msi,exitContext)... and it is not FIXED.
> 
> This should be throwing NotImplementedException.
Yes, of course, but when one of the two methods could be implemented,
the another is implemented automatically.

Please, take a look to the file that I posted in the list.

Thanks for your answer,

    Pedro

-- 
Pedro Martinez Juli�
\  [EMAIL PROTECTED]
)|    [EMAIL PROTECTED]
/        http://yoros.cjb.net
Socio HispaLinux #311
Usuario Linux #275438 - http://counter.li.org
GnuPG public information:  pub  1024D/74F1D3AC
Key fingerprint = 8431 7B47 D2B4 5A46 5F8E  534F 588B E285 74F1 D3AC

Attachment: msg05398/pgp00000.pgp
Description: PGP signature

Reply via email to