Platforms to show: All Mac Windows Linux Cross-Platform
CFErrorMBS class
Super class: CFObjectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CoreFoundation | MBS MacCF Plugin | 10.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
A CFError object encapsulates rich and extensible error information than is possible using only an error code or error string. The core attributes of a CFError object are an error domain (represented by a string), a domain-specific error code and a user info dictionary containing application specific information. Errors are required to have a domain and an error code within that domain. The optional "userInfo" dictionary may provide additional information that might be useful for the interpretation and reporting of the error. This dictionary can even contain an "underlying" error, which is wrapped as an error bubbles up through various layers.
Several well-known domains are defined corresponding to Mach, POSIX, and OSStatus errors. In addition, CFError allows you to attach an arbitrary user info dictionary to an error object, and provides the means to return a human-readable description for the error.
In general, a method should signal an error condition by—for example—returning false or nil rather than by the simple presence of an error object. The method can then optionally return an CFError object by reference, in order to further describe the error.
CFError is toll-free bridged to NSError in the Foundation framework—for more details on toll-free bridging, see Interchangeable Data Types. NSError has some additional guidelines which makes it easy to automatically report errors to users and even try to recover from them. See Error Handling Programming Guide for more information on NSError programming guidelines.
Requires Mac OS X 10.5 or newer.
Subclass of the CFObjectMBS class.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 6 properties
- property Code as Integer
- property Description as string
- property Domain as string
- property FailureReason as string
- property RecoverySuggestion as string
- property UserInfo as dictionary
- method Constructor Private
- 9 shared methods
- shared method kCFErrorDescriptionKey as string
- shared method kCFErrorDomainCocoa as string
- shared method kCFErrorDomainMach as string
- shared method kCFErrorDomainOSStatus as string
- shared method kCFErrorDomainPOSIX as string
- shared method kCFErrorLocalizedDescriptionKey as string
- shared method kCFErrorLocalizedFailureReasonKey as string
- shared method kCFErrorLocalizedRecoverySuggestionKey as string
- shared method kCFErrorUnderlyingErrorKey as string
Super class CFObjectMBS
- 5 properties
- property Handle as Integer
- property Hash as Integer
- property Lasterror as Integer
- property Type as Integer
- property TypeDescription as String
- 9 methods
- method close
- method DeepCopy as CFObjectMBS
- method EncodedData as MemoryBlock
- method Equal(o as CFObjectMBS) as boolean
- method ReleaseObject
- method RetainCount as Integer
- method RetainObject
- method XML as CFBinaryDataMBS
- method XMLdata as String
- shared method NewCFObject(handle as Integer) as CFObjectMBS
This class has no sub classes.
Some methods using this class:
- CoreTextMBS.RegisterFontsForURL(URLs() as string, scope as Integer, errors() as CFErrorMBS) as boolean
- CoreTextMBS.UnregisterFontsForURL(URL as string, scope as Integer, byref error as CFErrorMBS) as boolean
- CSProfileMBS.Constructor(data as string, byref error as CFErrorMBS)
- CSProfileMBS.Constructor(file as folderitem, byref error as CFErrorMBS)
- CSProfileMBS.CreateWithData(data as string, byref error as CFErrorMBS) as CSProfileMBS
- CSProfileMBS.CreateWithURL(url as string, byref error as CFErrorMBS) as CSProfileMBS
- CSProfileMBS.EstimateGammaWithDisplayID(displayID as Integer, byref error as CFErrorMBS) as Double
- CSProfileMBS.File(byref error as CFErrorMBS) as folderitem
- ServiceManagementModuleMBS.JobRemove(domain as string, jobLabel as string, auth as AuthorizationMBS, wait as boolean, byref error as CFErrorMBS) as boolean
- ServiceManagementModuleMBS.JobSubmit(domain as string, job as Dictionary, auth as AuthorizationMBS, byref error as CFErrorMBS) as boolean
Some events using this class:
- CFProxyMBS.AutoConfigurationResult(error as CFErrorMBS, proxyList() as Dictionary)
Some examples using this class:
- /MacCF/Proxy/CFProxy Tests
- /MacCF/Sandbox File Access/Sandbox Files
- /MacCF/SMJobBless in Xojo/MainApp
Blog Entries
Release notes
- Version 20.0
- Changed CFErrorMBS class to show properties in debugger.
The items on this page are in the following plugins: MBS MacCF Plugin.
CFDictionaryMBS - CFGregorianDateMBS