2 Copyright (C) 2000-2003 SKYRIX Software AG
4 This file is part of OGo
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #include "SxComponentException.h"
24 #include "SxBasicAuthCredentials.h"
25 #include "SxComponentInvocation.h"
28 @implementation NSException(SxComponentExceptionTyping)
30 - (BOOL)isCredentialsRequiredException {
34 @end /* NSException(SxComponentExceptionTyping) */
36 @implementation SxComponentException
37 @end /* SxComponentException */
39 @implementation SxAuthException
42 return [self initWithName:NSStringFromClass([self class])
48 RELEASE(self->invocation);
49 RELEASE(self->credentials);
55 - (BOOL)isCredentialsRequiredException {
59 - (void)setCredentials:(id)_credentials {
60 ASSIGN(self->credentials, _credentials);
63 return self->credentials;
66 - (void)setInvocation:(SxComponentInvocation *)_invocation {
67 ASSIGN(self->invocation, _invocation);
69 - (SxComponentInvocation *)invocation {
70 return self->invocation;
75 - (NSString *)description {
79 ms = [NSMutableString stringWithCapacity:64];
80 [ms appendFormat:@"<0x%08X[%@]: name=%@",
81 self, NSStringFromClass([self class]),
84 if ([self isCredentialsRequiredException])
85 [ms appendString:@" cred-required"];
87 if ((t = [self credentials]))
88 [ms appendFormat:@" creds=%@", t];
90 if ((t = [self invocation]))
91 [ms appendFormat:@" inv=%@", t];
93 [ms appendString:@">"];
98 @end /* SxAuthException */
100 @implementation SxMissingCredentialsException
101 @end /* SxMissingCredentialsException */
103 @implementation SxInvalidCredentialsException
104 @end /* SxInvalidCredentialsException */