[Box Backup] Win32 port (was: BoxBackup Server Side Management Specs (Draft0.01))

Chris Wilson boxbackup@fluffy.co.uk
Sat, 2 Oct 2004 23:43:54 +0100 (BST)


Hi Ben,

> So far I have not needed to change any code, and I hope that I can 
> maintain the Windows GUI semi-independently, only relying on some header 
> files from Box. However, there does seem to be a fair amount of 
> auto-generated and platform-dependent stuff that might require work on the 
> build system to integrate properly. I will tackle that when I have 
> something worth integrating :-)

I just added a virtual null declaration of what() to BoxException, since 
all the subclasses seem to implement it, and it's extremely useful. I 
could send you a patch, but it would be against 0.07 release, and it's 
trivial:

+++ lib/common/BoxException.h
@@ 70,1
+	virtual const char *what() const throw() = 0;

I would really like to see exceptions have more context information, for
example a filename in the case of an error opening a file. Perhaps the
default constructors for BoxException and subclasses should (optionally?)  
take a string to describe the context in a user-visible error message?

Is there a reason for implementing exceptions with various numeric codes, 
rather than creating an explicit subclass for each one? I think the latter 
would increase type-safety, and allow one to more easily catch an 
exception that you're expecting, while ignoring (and propagating) an 
unexpected exception.

Cheers, Chris.
-- 
_ ___ __     _
 / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |