06 Jan 2003 15:21:37 +0000
On Sat, 2003-01-04 at 09:17, firstname.lastname@example.org 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.)
> 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.