[more newsgroups added; i'm hoping that xpcom and netlib folks will
chime in here]
Paul Sandoz <[EMAIL PROTECTED]> writes:
> >> Perhaps re-using and
> >> creating exception codes and mapping these to
> >> i18n strings for dialogs to use in the address
> >> book?
> >
> >Sounds good.
>
> Just come across this bug:
>
> http://bugzilla.mozilla.org/show_bug.cgi?id=13423
>
> in relation to the nsIErrorService.idl
I suspect that nsIErrorService will probably be the most straightforward way
to propagate network-level errors up to the UI, since it's designed
for just this purpose. nsIException support just landed recently
<http://lxr.mozilla.org/seamonkey/source/xpcom/base/nsIException.idl>,
so it would also be interesting to hear whether the netlib folks have
any plans to move in that direction, and what the stated XPCOM
direction is...
> >> Or is there going to be generic listeners on
> >> ldap sessions/connections which can inform the
> >> user when somthing has gone wrong? so that
> >> specific applications do not need to inform
> >> the user if general ldap operations have failed.
> >
> >I hope you don't suggest to put up error dialogs from the backend? A few
> >functions in Mailnews do that, and they cause problems when there is no
> >GUI (as in my Mailnews CORBA wrapper). It's a bug.
> >
>
> Gosh no!
>
> I was wondering if it was possible for the mozilla
> browser to add observers to an ldap 'session manager'
> such that it could listen to specific events like
> errors and thus display generic dialogs (if of course
> the client performing an ldap operation allowed for
> listening to be enabled perhaps?)
> Or maybe have a session manager context so that different
> clients can deal with ldap errors within contexts in a
> more specific manner.
>
> I think it might be easier to extend the address book
> session interface to handle the registration of error
> observers. Thus ensuring scriptablity and GUI independence
> of the address book implemenations.
Well, the LDAP routines all return the errors documented in
the nsILDAPErrors.idl and nsLDAP.h in directory/xpcom/base/public/.
So I'm a little unclear why a session manager or observer paradigm
would be useful in this context... wouldn't have the calling code and
callback functions check for errors be sufficient?
(Tangent: I think the nsLDAP.h errors should probably be moved to a
%C++ block in nsILDAPErrors.idl).
Dan
--