ObjFW  Check-in [6334474ec0]

Overview
Comment:bridge: Do not convert exceptions into NSErrors

Instead, provide a try method that takes up to 3 blocks.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6334474ec09e36282e5b30be9e6e71092d588d89e2d7458df02a3a79c9d1d912
User & Date: js on 2017-10-20 21:20:29
Other Links: manifest | tags
Context
2017-10-21
20:22
call-x86_64-elf.S: Fix using wrong register check-in: 5536319c9f user: js tags: trunk
2017-10-20
21:20
bridge: Do not convert exceptions into NSErrors check-in: 6334474ec0 user: js tags: trunk
20:49
Add OFException -> NSError bridge check-in: 6bac6e95cb user: js tags: trunk
Changes

Modified ObjFW.xcodeproj/project.pbxproj from [d76ed36ce2] to [7cfbcb5cec].

1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
		4BF33B4713380CE20059CEF7 /* testfile.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BF33B4313380CD40059CEF7 /* testfile.txt */; };
		4BF33B4813380D2D0059CEF7 /* testfile.bin in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BF33B4213380CD40059CEF7 /* testfile.bin */; };
		4BF3A2291E25EA48002EA46F /* windows-1251.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF3A2281E25EA48002EA46F /* windows-1251.m */; };
		4BF3A22A1E25EA48002EA46F /* windows-1251.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF3A2281E25EA48002EA46F /* windows-1251.m */; };
		4BF5CB901E2DC1D800CF7584 /* iso_8859-2.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF5CB8F1E2DC1D800CF7584 /* iso_8859-2.m */; };
		4BF5CB911E2DC1D800CF7584 /* iso_8859-2.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF5CB8F1E2DC1D800CF7584 /* iso_8859-2.m */; };
		4BF69CE61BD44F8B00DFFC1B /* platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF69CE51BD44F8B00DFFC1B /* platform.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF8FE561F9A97E100CB9F9C /* OFException+NSError.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8FE541F9A97E100CB9F9C /* OFException+NSError.m */; settings = {COMPILER_FLAGS = "-fconstant-cfstrings"; }; };
		4BF8FE571F9A97E100CB9F9C /* OFException+NSError.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8FE541F9A97E100CB9F9C /* OFException+NSError.m */; settings = {COMPILER_FLAGS = "-fconstant-cfstrings"; }; };
		4BF8FE581F9A97E100CB9F9C /* OFException+NSError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8FE551F9A97E100CB9F9C /* OFException+NSError.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF8FE591F9A97E100CB9F9C /* OFException+NSError.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8FE551F9A97E100CB9F9C /* OFException+NSError.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BFC37BD1E50E11C00EE1269 /* common.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFC37BC1E50E11C00EE1269 /* common.h */; };
		4BFC37BE1E50E11C00EE1269 /* common.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFC37BC1E50E11C00EE1269 /* common.h */; };
		4BFF3714177E17C100192782 /* OFRemoveItemFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BFF3715177E17C100192782 /* OFRemoveItemFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */







|
|
|
|







1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
		4BF33B4713380CE20059CEF7 /* testfile.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BF33B4313380CD40059CEF7 /* testfile.txt */; };
		4BF33B4813380D2D0059CEF7 /* testfile.bin in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BF33B4213380CD40059CEF7 /* testfile.bin */; };
		4BF3A2291E25EA48002EA46F /* windows-1251.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF3A2281E25EA48002EA46F /* windows-1251.m */; };
		4BF3A22A1E25EA48002EA46F /* windows-1251.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF3A2281E25EA48002EA46F /* windows-1251.m */; };
		4BF5CB901E2DC1D800CF7584 /* iso_8859-2.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF5CB8F1E2DC1D800CF7584 /* iso_8859-2.m */; };
		4BF5CB911E2DC1D800CF7584 /* iso_8859-2.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF5CB8F1E2DC1D800CF7584 /* iso_8859-2.m */; };
		4BF69CE61BD44F8B00DFFC1B /* platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF69CE51BD44F8B00DFFC1B /* platform.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF8FE561F9A97E100CB9F9C /* OFException+Swift.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8FE541F9A97E100CB9F9C /* OFException+Swift.m */; };
		4BF8FE571F9A97E100CB9F9C /* OFException+Swift.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF8FE541F9A97E100CB9F9C /* OFException+Swift.m */; };
		4BF8FE581F9A97E100CB9F9C /* OFException+Swift.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8FE551F9A97E100CB9F9C /* OFException+Swift.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF8FE591F9A97E100CB9F9C /* OFException+Swift.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF8FE551F9A97E100CB9F9C /* OFException+Swift.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BFC37BD1E50E11C00EE1269 /* common.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFC37BC1E50E11C00EE1269 /* common.h */; };
		4BFC37BE1E50E11C00EE1269 /* common.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFC37BC1E50E11C00EE1269 /* common.h */; };
		4BFF3714177E17C100192782 /* OFRemoveItemFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BFF3715177E17C100192782 /* OFRemoveItemFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
		4BF20C501EEBF5F000C53220 /* OFInflateStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFInflateStream.m; path = src/OFInflateStream.m; sourceTree = "<group>"; };
		4BF33AF0133807310059CEF7 /* Tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tests; sourceTree = BUILT_PRODUCTS_DIR; };
		4BF33B4213380CD40059CEF7 /* testfile.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = testfile.bin; path = tests/testfile.bin; sourceTree = "<group>"; };
		4BF33B4313380CD40059CEF7 /* testfile.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = testfile.txt; path = tests/testfile.txt; sourceTree = "<group>"; };
		4BF3A2281E25EA48002EA46F /* windows-1251.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "windows-1251.m"; path = "src/encodings/windows-1251.m"; sourceTree = "<group>"; };
		4BF5CB8F1E2DC1D800CF7584 /* iso_8859-2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "iso_8859-2.m"; path = "src/encodings/iso_8859-2.m"; sourceTree = "<group>"; };
		4BF69CE51BD44F8B00DFFC1B /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = platform.h; path = src/platform.h; sourceTree = "<group>"; };
		4BF8FE541F9A97E100CB9F9C /* OFException+NSError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFException+NSError.m"; path = "src/bridge/OFException+NSError.m"; sourceTree = "<group>"; };
		4BF8FE551F9A97E100CB9F9C /* OFException+NSError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFException+NSError.h"; path = "src/bridge/OFException+NSError.h"; sourceTree = "<group>"; };
		4BFBDD1610A0724800051AFB /* unicode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = unicode.m; path = src/unicode.m; sourceTree = "<group>"; };
		4BFC37BC1E50E11C00EE1269 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = src/encodings/common.h; sourceTree = "<group>"; };
		4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFRemoveItemFailedException.h; path = src/exceptions/OFRemoveItemFailedException.h; sourceTree = "<group>"; };
		4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFRemoveItemFailedException.m; path = src/exceptions/OFRemoveItemFailedException.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */







|
|







1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
		4BF20C501EEBF5F000C53220 /* OFInflateStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFInflateStream.m; path = src/OFInflateStream.m; sourceTree = "<group>"; };
		4BF33AF0133807310059CEF7 /* Tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tests; sourceTree = BUILT_PRODUCTS_DIR; };
		4BF33B4213380CD40059CEF7 /* testfile.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = testfile.bin; path = tests/testfile.bin; sourceTree = "<group>"; };
		4BF33B4313380CD40059CEF7 /* testfile.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = testfile.txt; path = tests/testfile.txt; sourceTree = "<group>"; };
		4BF3A2281E25EA48002EA46F /* windows-1251.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "windows-1251.m"; path = "src/encodings/windows-1251.m"; sourceTree = "<group>"; };
		4BF5CB8F1E2DC1D800CF7584 /* iso_8859-2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "iso_8859-2.m"; path = "src/encodings/iso_8859-2.m"; sourceTree = "<group>"; };
		4BF69CE51BD44F8B00DFFC1B /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = platform.h; path = src/platform.h; sourceTree = "<group>"; };
		4BF8FE541F9A97E100CB9F9C /* OFException+Swift.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFException+Swift.m"; path = "src/bridge/OFException+Swift.m"; sourceTree = "<group>"; };
		4BF8FE551F9A97E100CB9F9C /* OFException+Swift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFException+Swift.h"; path = "src/bridge/OFException+Swift.h"; sourceTree = "<group>"; };
		4BFBDD1610A0724800051AFB /* unicode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = unicode.m; path = src/unicode.m; sourceTree = "<group>"; };
		4BFC37BC1E50E11C00EE1269 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = src/encodings/common.h; sourceTree = "<group>"; };
		4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFRemoveItemFailedException.h; path = src/exceptions/OFRemoveItemFailedException.h; sourceTree = "<group>"; };
		4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFRemoveItemFailedException.m; path = src/exceptions/OFRemoveItemFailedException.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
				4B187E32163EA3DA0049A832 /* OFArray+NSObject.h */,
				4B187E33163EA3DA0049A832 /* OFArray+NSObject.m */,
				4B187E34163EA3DA0049A832 /* OFBridging.h */,
				4B187E35163EA3DA0049A832 /* OFDictionary_NSDictionary.h */,
				4B187E36163EA3DA0049A832 /* OFDictionary_NSDictionary.m */,
				4B187E37163EA3DA0049A832 /* OFDictionary+NSObject.h */,
				4B187E38163EA3DA0049A832 /* OFDictionary+NSObject.m */,
				4BF8FE551F9A97E100CB9F9C /* OFException+NSError.h */,
				4BF8FE541F9A97E100CB9F9C /* OFException+NSError.m */,
				4B187E39163EA3DA0049A832 /* OFString+NSObject.h */,
				4B187E3A163EA3DA0049A832 /* OFString+NSObject.m */,
				4B187E22163EA3DA0049A832 /* ObjFW_Bridge.h */,
			);
			name = Bridge;
			sourceTree = "<group>";
		};







|
|







2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
				4B187E32163EA3DA0049A832 /* OFArray+NSObject.h */,
				4B187E33163EA3DA0049A832 /* OFArray+NSObject.m */,
				4B187E34163EA3DA0049A832 /* OFBridging.h */,
				4B187E35163EA3DA0049A832 /* OFDictionary_NSDictionary.h */,
				4B187E36163EA3DA0049A832 /* OFDictionary_NSDictionary.m */,
				4B187E37163EA3DA0049A832 /* OFDictionary+NSObject.h */,
				4B187E38163EA3DA0049A832 /* OFDictionary+NSObject.m */,
				4BF8FE551F9A97E100CB9F9C /* OFException+Swift.h */,
				4BF8FE541F9A97E100CB9F9C /* OFException+Swift.m */,
				4B187E39163EA3DA0049A832 /* OFString+NSObject.h */,
				4B187E3A163EA3DA0049A832 /* OFString+NSObject.m */,
				4B187E22163EA3DA0049A832 /* ObjFW_Bridge.h */,
			);
			name = Bridge;
			sourceTree = "<group>";
		};
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
				4B0E297B1DA2A8A400323A76 /* NSArray+OFObject.h in Headers */,
				4B0E297C1DA2A8A400323A76 /* NSBridging.h in Headers */,
				4B0E297E1DA2A8A400323A76 /* NSDictionary+OFObject.h in Headers */,
				4B0E297F1DA2A8A400323A76 /* NSString+OFObject.h in Headers */,
				4B0E29811DA2A8A400323A76 /* OFArray+NSObject.h in Headers */,
				4B0E29821DA2A8A400323A76 /* OFBridging.h in Headers */,
				4B0E29841DA2A8A400323A76 /* OFDictionary+NSObject.h in Headers */,
				4BF8FE591F9A97E100CB9F9C /* OFException+NSError.h in Headers */,
				4B0E29851DA2A8A400323A76 /* OFString+NSObject.h in Headers */,
				4B0E29861DA2A8A400323A76 /* ObjFW_Bridge.h in Headers */,
				4B0E297A1DA2A8A400323A76 /* NSArray_OFArray.h in Headers */,
				4B0E297D1DA2A8A400323A76 /* NSDictionary_OFDictionary.h in Headers */,
				4B0E29801DA2A8A400323A76 /* OFArray_NSArray.h in Headers */,
				4B0E29831DA2A8A400323A76 /* OFDictionary_NSDictionary.h in Headers */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4B187E0B163EA29F0049A832 /* Headers */ = {
			isa = PBXHeadersBuildPhase;
			buildActionMask = 2147483647;
			files = (
				4B187E42163EA3DA0049A832 /* NSArray+OFObject.h in Headers */,
				4B187E45163EA3DA0049A832 /* NSBridging.h in Headers */,
				4B187E49163EA3DA0049A832 /* NSDictionary+OFObject.h in Headers */,
				4BF8FE581F9A97E100CB9F9C /* OFException+NSError.h in Headers */,
				4B187E4C163EA3DA0049A832 /* NSString+OFObject.h in Headers */,
				4B187E52163EA3DA0049A832 /* OFArray+NSObject.h in Headers */,
				4B187E55163EA3DA0049A832 /* OFBridging.h in Headers */,
				4B187E59163EA3DA0049A832 /* OFDictionary+NSObject.h in Headers */,
				4B187E5C163EA3DA0049A832 /* OFString+NSObject.h in Headers */,
				4B187E3B163EA3DA0049A832 /* ObjFW_Bridge.h in Headers */,
				4B187E3F163EA3DA0049A832 /* NSArray_OFArray.h in Headers */,







|
















|







2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
				4B0E297B1DA2A8A400323A76 /* NSArray+OFObject.h in Headers */,
				4B0E297C1DA2A8A400323A76 /* NSBridging.h in Headers */,
				4B0E297E1DA2A8A400323A76 /* NSDictionary+OFObject.h in Headers */,
				4B0E297F1DA2A8A400323A76 /* NSString+OFObject.h in Headers */,
				4B0E29811DA2A8A400323A76 /* OFArray+NSObject.h in Headers */,
				4B0E29821DA2A8A400323A76 /* OFBridging.h in Headers */,
				4B0E29841DA2A8A400323A76 /* OFDictionary+NSObject.h in Headers */,
				4BF8FE591F9A97E100CB9F9C /* OFException+Swift.h in Headers */,
				4B0E29851DA2A8A400323A76 /* OFString+NSObject.h in Headers */,
				4B0E29861DA2A8A400323A76 /* ObjFW_Bridge.h in Headers */,
				4B0E297A1DA2A8A400323A76 /* NSArray_OFArray.h in Headers */,
				4B0E297D1DA2A8A400323A76 /* NSDictionary_OFDictionary.h in Headers */,
				4B0E29801DA2A8A400323A76 /* OFArray_NSArray.h in Headers */,
				4B0E29831DA2A8A400323A76 /* OFDictionary_NSDictionary.h in Headers */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4B187E0B163EA29F0049A832 /* Headers */ = {
			isa = PBXHeadersBuildPhase;
			buildActionMask = 2147483647;
			files = (
				4B187E42163EA3DA0049A832 /* NSArray+OFObject.h in Headers */,
				4B187E45163EA3DA0049A832 /* NSBridging.h in Headers */,
				4B187E49163EA3DA0049A832 /* NSDictionary+OFObject.h in Headers */,
				4BF8FE581F9A97E100CB9F9C /* OFException+Swift.h in Headers */,
				4B187E4C163EA3DA0049A832 /* NSString+OFObject.h in Headers */,
				4B187E52163EA3DA0049A832 /* OFArray+NSObject.h in Headers */,
				4B187E55163EA3DA0049A832 /* OFBridging.h in Headers */,
				4B187E59163EA3DA0049A832 /* OFDictionary+NSObject.h in Headers */,
				4B187E5C163EA3DA0049A832 /* OFString+NSObject.h in Headers */,
				4B187E3B163EA3DA0049A832 /* ObjFW_Bridge.h in Headers */,
				4B187E3F163EA3DA0049A832 /* NSArray_OFArray.h in Headers */,
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
				4B0E296E1DA2A8A400323A76 /* NSDictionary_OFDictionary.m in Sources */,
				4B0E296F1DA2A8A400323A76 /* NSDictionary+OFObject.m in Sources */,
				4B0E29701DA2A8A400323A76 /* NSString+OFObject.m in Sources */,
				4B0E29711DA2A8A400323A76 /* OFArray_NSArray.m in Sources */,
				4B0E29721DA2A8A400323A76 /* OFArray+NSObject.m in Sources */,
				4B0E29731DA2A8A400323A76 /* OFDictionary_NSDictionary.m in Sources */,
				4B0E29741DA2A8A400323A76 /* OFDictionary+NSObject.m in Sources */,
				4BF8FE571F9A97E100CB9F9C /* OFException+NSError.m in Sources */,
				4B0E29751DA2A8A400323A76 /* OFString+NSObject.m in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4B187E09163EA29F0049A832 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				4B187E41163EA3DA0049A832 /* NSArray_OFArray.m in Sources */,
				4B187E44163EA3DA0049A832 /* NSArray+OFObject.m in Sources */,
				4B187E48163EA3DA0049A832 /* NSDictionary_OFDictionary.m in Sources */,
				4B187E4B163EA3DA0049A832 /* NSDictionary+OFObject.m in Sources */,
				4B187E4E163EA3DA0049A832 /* NSString+OFObject.m in Sources */,
				4B187E51163EA3DA0049A832 /* OFArray_NSArray.m in Sources */,
				4B187E54163EA3DA0049A832 /* OFArray+NSObject.m in Sources */,
				4B187E58163EA3DA0049A832 /* OFDictionary_NSDictionary.m in Sources */,
				4B187E5B163EA3DA0049A832 /* OFDictionary+NSObject.m in Sources */,
				4BF8FE561F9A97E100CB9F9C /* OFException+NSError.m in Sources */,
				4B187E5E163EA3DA0049A832 /* OFString+NSObject.m in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4B23CA86133811610047A1D9 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;







|

















|







3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
				4B0E296E1DA2A8A400323A76 /* NSDictionary_OFDictionary.m in Sources */,
				4B0E296F1DA2A8A400323A76 /* NSDictionary+OFObject.m in Sources */,
				4B0E29701DA2A8A400323A76 /* NSString+OFObject.m in Sources */,
				4B0E29711DA2A8A400323A76 /* OFArray_NSArray.m in Sources */,
				4B0E29721DA2A8A400323A76 /* OFArray+NSObject.m in Sources */,
				4B0E29731DA2A8A400323A76 /* OFDictionary_NSDictionary.m in Sources */,
				4B0E29741DA2A8A400323A76 /* OFDictionary+NSObject.m in Sources */,
				4BF8FE571F9A97E100CB9F9C /* OFException+Swift.m in Sources */,
				4B0E29751DA2A8A400323A76 /* OFString+NSObject.m in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4B187E09163EA29F0049A832 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				4B187E41163EA3DA0049A832 /* NSArray_OFArray.m in Sources */,
				4B187E44163EA3DA0049A832 /* NSArray+OFObject.m in Sources */,
				4B187E48163EA3DA0049A832 /* NSDictionary_OFDictionary.m in Sources */,
				4B187E4B163EA3DA0049A832 /* NSDictionary+OFObject.m in Sources */,
				4B187E4E163EA3DA0049A832 /* NSString+OFObject.m in Sources */,
				4B187E51163EA3DA0049A832 /* OFArray_NSArray.m in Sources */,
				4B187E54163EA3DA0049A832 /* OFArray+NSObject.m in Sources */,
				4B187E58163EA3DA0049A832 /* OFDictionary_NSDictionary.m in Sources */,
				4B187E5B163EA3DA0049A832 /* OFDictionary+NSObject.m in Sources */,
				4BF8FE561F9A97E100CB9F9C /* OFException+Swift.m in Sources */,
				4B187E5E163EA3DA0049A832 /* OFString+NSObject.m in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4B23CA86133811610047A1D9 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;

Modified src/bridge/Makefile from [8e696547fc] to [c8a0675322].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
include ../../extra.mk

DISTCLEAN = Info.plist

SHARED_LIB = ${OBJFW_BRIDGE_SHARED_LIB}
STATIC_LIB = ${OBJFW_BRIDGE_STATIC_LIB}
LIB_MAJOR = ${OBJFW_LIB_MAJOR}
LIB_MINOR = ${OBJFW_LIB_MINOR}
FRAMEWORK = ObjFW_Bridge.framework

SRCS = OFArray+NSObject.m		\
       OFException+NSError.m		\
       OFDictionary+NSObject.m		\
       OFString+NSObject.m		\
       NSArray+OFObject.m		\
       NSDictionary+OFObject.m		\
       NSString+OFObject.m

INCLUDES := ${SRCS:.m=.h}	\
	    NSBridging.h	\
	    OFBridging.h	\
	    ObjFW_Bridge.h











|
|
|
|
|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
include ../../extra.mk

DISTCLEAN = Info.plist

SHARED_LIB = ${OBJFW_BRIDGE_SHARED_LIB}
STATIC_LIB = ${OBJFW_BRIDGE_STATIC_LIB}
LIB_MAJOR = ${OBJFW_LIB_MAJOR}
LIB_MINOR = ${OBJFW_LIB_MINOR}
FRAMEWORK = ObjFW_Bridge.framework

SRCS = OFArray+NSObject.m	\
       OFException+Swift.m	\
       OFDictionary+NSObject.m	\
       OFString+NSObject.m	\
       NSArray+OFObject.m	\
       NSDictionary+OFObject.m	\
       NSString+OFObject.m

INCLUDES := ${SRCS:.m=.h}	\
	    NSBridging.h	\
	    OFBridging.h	\
	    ObjFW_Bridge.h

31
32
33
34
35
36
37
38
39
include ../../buildsys.mk

CPPFLAGS += -I. -I.. -I../.. -I../exceptions -DOF_BRIDGE_LOCAL_INCLUDES
LD = ${OBJC}
LIBS = -framework Foundation
LIB_LDFLAGS += -L.. -lobjfw
FRAMEWORK_LDFLAGS += -F.. -framework ObjFW

OBJCFLAGS_OFException+NSError.m += -fconstant-cfstrings







<
<
31
32
33
34
35
36
37


include ../../buildsys.mk

CPPFLAGS += -I. -I.. -I../.. -I../exceptions -DOF_BRIDGE_LOCAL_INCLUDES
LD = ${OBJC}
LIBS = -framework Foundation
LIB_LDFLAGS += -L.. -lobjfw
FRAMEWORK_LDFLAGS += -F.. -framework ObjFW


Deleted src/bridge/OFException+NSError.h version [d3c2baee84].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#ifdef OF_BRIDGE_LOCAL_INCLUDES
# import "OFException.h"
#else
# if defined(__has_feature) && __has_feature(modules)
@import ObjFW;
# else
#  import <ObjFW/OFException.h>
# endif
#endif

OF_ASSUME_NONNULL_BEGIN

@class NSError;

@interface OFException (NSError)
#ifdef OF_HAVE_BLOCKS
+ (BOOL)tryBlock: (void (^)(void))block
	   error: (NSError **)error;
#endif
@end

OF_ASSUME_NONNULL_END
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































Deleted src/bridge/OFException+NSError.m version [636635d3fb].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import <Foundation/NSDictionary.h>
#import <Foundation/NSError.h>
#import <Foundation/NSString.h>

#import "OFString.h"

#import "OFException+NSError.h"

@implementation OFException (NSError)
#ifdef OF_HAVE_BLOCKS
+ (BOOL)tryBlock: (void (^)(void))block
	   error: (NSError **)error
{
	@try {
		block();
		return YES;
	} @catch (OFException *e) {
		if (error != NULL) {
			NSDictionary *userInfo = [NSDictionary
			    dictionaryWithObject: e
					  forKey: @"exception"];
			*error = [NSError errorWithDomain: @"OFException"
						     code: 0
						 userInfo: userInfo];
		}

		return NO;
	}
}
#endif
@end
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































Added src/bridge/OFException+Swift.h version [7dab854e63].



























































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#ifdef OF_BRIDGE_LOCAL_INCLUDES
# import "OFException.h"
#else
# if defined(__has_feature) && __has_feature(modules)
@import ObjFW;
# else
#  import <ObjFW/OFException.h>
# endif
#endif

OF_ASSUME_NONNULL_BEGIN

@interface OFException (Swift)
#ifdef OF_HAVE_BLOCKS
/*!
 * @brief Execute the specified try block and call the catch block if an
 *	  OFException occurred.
 *
 * @note This is only useful to catch OFExceptions in Swift.
 *
 * @param try The try block to execute
 * @param catch The catch block to execute if an OFException occurred
 */
+ (void)try: (void (^)(void))try
      catch: (void (^)(OF_KINDOF(OFException *)))catch;

/*!
 * @brief Execute the specified try block and finally call the finally block.
 *
 * @note This is only useful for Swift.
 *
 * @param try The try block to execute
 * @param finally The finally block to call at the end
 */
+ (void)try: (void (^)(void))try
    finally: (void (^)(void))finally;

/*!
 * @brief Execute the specified try block and call the catch block if an
 *	  OFException occurred and finally call the finally block.
 *
 * @note This is only useful to catch OFExceptions in Swift.
 *
 * @param try The try block to execute
 * @param catch The catch block to execute if an OFException occurred
 * @param finally The finally block to call at the end
 */
+ (void)try: (void (^)(void))try
      catch: (void (^)(OF_KINDOF(OFException *)))catch
    finally: (void (^)(void))finally;
#endif

/*!
 * @brief Raises the exception.
 *
 * @note This is only useful to raise OFExceptions in Swift.
 */
- (void)throw;
@end

OF_ASSUME_NONNULL_END

Added src/bridge/OFException+Swift.m version [e976b19055].























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFException+Swift.h"

@implementation OFException (NSError)
#ifdef OF_HAVE_BLOCKS
+ (void)try: (void (^)(void))try
      catch: (void (^)(OF_KINDOF(OFException *e)))catch
{
	@try {
		try();
	} @catch (OFException *e) {
		catch(e);
	}
}

+ (void)try: (void (^)(void))try
    finally: (void (^)(void))finally
{
	@try {
		try();
	} @finally {
		finally();
	}
}

+ (void)try: (void (^)(void))try
      catch: (void (^)(OF_KINDOF(OFException *e)))catch
    finally: (void (^)(void))finally
{
	@try {
		try();
	} @catch (OFException *e) {
		catch(e);
	} @finally {
		finally();
	}
}
#endif

- (void)throw
{
	@throw self;
}
@end

Modified src/bridge/ObjFW_Bridge.h from [bf99b4590f] to [d27dee208a].

15
16
17
18
19
20
21
22
23
24
 */

#import "NSArray+OFObject.h"
#import "NSDictionary+OFObject.h"
#import "NSString+OFObject.h"

#import "OFArray+NSObject.h"
#import "OFException+NSError.h"
#import "OFDictionary+NSObject.h"
#import "OFString+NSObject.h"







|


15
16
17
18
19
20
21
22
23
24
 */

#import "NSArray+OFObject.h"
#import "NSDictionary+OFObject.h"
#import "NSString+OFObject.h"

#import "OFArray+NSObject.h"
#import "OFException+Swift.h"
#import "OFDictionary+NSObject.h"
#import "OFString+NSObject.h"