Skip to content

Commit e869c32

Browse files
committed
SSYUserInfoErrorDomain and SSYUserInfoCouldNotGetLoginTimeError now appear in the API (header).
1 parent 99470dc commit e869c32

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

SSYUserInfo.h

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#import <Cocoa/Cocoa.h>
22

3+
extern NSString* const SSYUserInfoErrorDomain;
4+
extern NSInteger const SSYUserInfoCouldNotGetLoginTimeError;
35

46
/*!
57
Methods for getting info about the current macOS user, aka "console" user

SSYUserInfo.m

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#import <utmpx.h>
66
#import <string.h>
77

8+
NSString* const SSYUserInfoErrorDomain = @"SSYUserInfoErrorDomain";
9+
NSInteger const SSYUserInfoCouldNotGetLoginTimeError = 948308;
810

911
@implementation SSYUserInfo
1012

@@ -91,8 +93,8 @@ + (NSDate*)whenThisUserLoggedInError_p:(NSError**)error_p {
9193
endutxent_wtmp();
9294

9395
if (!date && error_p) {
94-
NSError* error = [NSError errorWithDomain:@"SSYUserInfoErrorDomain"
95-
code:948308
96+
NSError* error = [NSError errorWithDomain:SSYUserInfoErrorDomain
97+
code:SSYUserInfoCouldNotGetLoginTimeError
9698
userInfo:@{
9799
NSLocalizedDescriptionKey: @"SSYUserInfo could not find `%@` console UTX entry",
98100
@"entries count": [NSNumber numberWithInteger:countOfEntries],

0 commit comments

Comments
 (0)