Expand description
Error type for Foundation.
Corresponds to Foundation/NSError.hpp.
§C++ Equivalent
namespace NS {
using ErrorDomain = class String*;
_NS_CONST(ErrorDomain, CocoaErrorDomain);
_NS_CONST(ErrorDomain, POSIXErrorDomain);
_NS_CONST(ErrorDomain, OSStatusErrorDomain);
_NS_CONST(ErrorDomain, MachErrorDomain);
using ErrorUserInfoKey = class String*;
_NS_CONST(ErrorUserInfoKey, UnderlyingErrorKey);
_NS_CONST(ErrorUserInfoKey, LocalizedDescriptionKey);
_NS_CONST(ErrorUserInfoKey, LocalizedFailureReasonErrorKey);
_NS_CONST(ErrorUserInfoKey, LocalizedRecoverySuggestionErrorKey);
_NS_CONST(ErrorUserInfoKey, LocalizedRecoveryOptionsErrorKey);
_NS_CONST(ErrorUserInfoKey, RecoveryAttempterErrorKey);
_NS_CONST(ErrorUserInfoKey, HelpAnchorErrorKey);
_NS_CONST(ErrorUserInfoKey, DebugDescriptionErrorKey);
_NS_CONST(ErrorUserInfoKey, LocalizedFailureErrorKey);
_NS_CONST(ErrorUserInfoKey, StringEncodingErrorKey);
_NS_CONST(ErrorUserInfoKey, URLErrorKey);
_NS_CONST(ErrorUserInfoKey, FilePathErrorKey);
class Error : public Copying<Error> {
public:
static Error* error(ErrorDomain domain, Integer code, class Dictionary* pDictionary);
static Error* alloc();
Error* init();
Error* init(ErrorDomain domain, Integer code, class Dictionary* pDictionary);
Integer code() const;
ErrorDomain domain() const;
class Dictionary* userInfo() const;
class String* localizedDescription() const;
class Array* localizedRecoveryOptions() const;
class String* localizedRecoverySuggestion() const;
class String* localizedFailureReason() const;
};
}Structs§
- Error
- An Objective-C error object.
Functions§
- cocoa_
error_ domain - Get the Cocoa error domain.
- debug_
description_ error_ key - Get the debug description error key.
- file_
path_ error_ key - Get the file path error key.
- help_
anchor_ error_ key - Get the help anchor error key.
- localized_
description_ key - Get the localized description key.
- localized_
failure_ error_ key - Get the localized failure error key.
- localized_
failure_ reason_ error_ key - Get the localized failure reason error key.
- localized_
recovery_ options_ error_ key - Get the localized recovery options error key.
- localized_
recovery_ suggestion_ error_ key - Get the localized recovery suggestion error key.
- mach_
error_ domain - Get the Mach error domain.
- os_
status_ error_ domain - Get the OSStatus error domain.
- posix_
error_ domain - Get the POSIX error domain.
- recovery_
attempter_ error_ key - Get the recovery attempter error key.
- string_
encoding_ error_ key - Get the string encoding error key.
- underlying_
error_ key - Get the underlying error key.
- url_
error_ key - Get the URL error key.
Type Aliases§
- Error
Domain - Error domain type (alias for String pointer).
- Error
User Info Key - Error user info key type (alias for String pointer).