File tree 2 files changed +43
-4
lines changed
2 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 3
3
#import < Availability.h>
4
4
#import < Foundation/Foundation.h>
5
5
6
- #define RAISE_UNSUPPORTED_MACOS_EXCEPTION () \
7
- do { \
8
- [[NSException exceptionWithName: @" UnhandledException" reason: @" bug" userInfo: nil ] raise ]; \
9
- __builtin_unreachable (); \
6
+ NSDictionary *dumpProcessinfo ();
7
+
8
+ #define RAISE_REASON_MESSAGE \
9
+ " This may possibly be a bug due to library handling errors.\n " \
10
+ " I would appreciate it if you could report it to https://github.com/Code-Hex/vz/issues/new/choose\n\n " \
11
+ " Information: %@\n "
12
+
13
+ #define RAISE_UNSUPPORTED_MACOS_EXCEPTION () \
14
+ do { \
15
+ [NSException \
16
+ raise :@" UnhandledAvailabilityException" \
17
+ format: @RAISE_REASON_MESSAGE, dumpProcessinfo ()]; \
18
+ __builtin_unreachable (); \
10
19
} while (0 )
11
20
12
21
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 130000
Original file line number Diff line number Diff line change
1
+ //
2
+ // virtualization_helper.m
3
+ //
4
+ // Created by codehex.
5
+ //
6
+
7
+ #import " virtualization_helper.h"
8
+
9
+ #ifdef __arm64__
10
+ #define TARGET_ARM64 1
11
+ #else
12
+ #define TARGET_ARM64 0
13
+ #endif
14
+
15
+ NSDictionary *dumpProcessinfo ()
16
+ {
17
+ NSString *osVersionString = [[NSProcessInfo processInfo ] operatingSystemVersionString ];
18
+ return @{
19
+ @" LLVM (Clang) Version" : @__VERSION__,
20
+ @" Target for arm64" : @TARGET_ARM64,
21
+ // The version of the macOS on which the process is executing.
22
+ @" Running OS Version" : osVersionString,
23
+ #ifdef __MAC_OS_X_VERSION_MAX_ALLOWED
24
+ @" Max Allowed OS Version" : @__MAC_OS_X_VERSION_MAX_ALLOWED,
25
+ #endif
26
+ #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
27
+ @" Min Required OS Version" : @__MAC_OS_X_VERSION_MIN_REQUIRED,
28
+ #endif
29
+ };
30
+ }
You can’t perform that action at this time.
0 commit comments