Skip to content

Commit cd7fd31

Browse files
authored
Merge pull request #2633 from AzureAD/josephpab/loggingCallback
Moved throw from setting MSAL logging callback
2 parents 36dd6d3 + df833da commit cd7fd31

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

MSAL/src/configuration/MSALLoggerConfig.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,14 @@ - (void)setLogCallback:(MSALLogCallback)callback
5454
{
5555
if (self.callback != nil)
5656
{
57-
@throw @"MSAL logging callback can only be set once per process and should never changed once set.";
57+
#if DEBUG
58+
@throw [NSException
59+
exceptionWithName:NSInternalInconsistencyException
60+
reason:@"MSAL logging callback can only be set once per process and should never be changed once set."
61+
userInfo:nil];
62+
#endif
63+
MSID_LOG_WITH_CTX(MSIDLogLevelError, nil, @"MSAL logging callback can only be set once per process and should never be changed once set.");
64+
return;
5865
}
5966

6067
static dispatch_once_t once;

0 commit comments

Comments
 (0)