[Win32utils-devel] code cleanup suggestion - error classes

win32utils-devel at rubyforge.org win32utils-devel at rubyforge.org
Thu Jan 22 08:53:48 EST 2004

Currently, most of the modules define an error class of some sort (e.g.
cWin32ServiceError).  Within the code, the error is raised like this:


It seems logical that, instead of appending the message every time, that
we should simply call ErrorDescription(GetLastError()) simply by raising
an error (i.e. within the 'initialize' method of cWin32ServiceError).
In other words, you would simply have to do:


And it would automatically include the error description.

Seem reasonable?


PS - Park and Shashank, I thought it might be better if we send our
emails to the mailing list I setup rather than to each other directly.
That way there's an archive of our discussions for others to look at if
they want.  I think I'll have to approve the first email you send to the
list (the list is moderated), but I think I can configure it so that I
only have to do that once.  After that, you should be able to post
freely. :) 

More information about the win32utils-devel mailing list