Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSErrorMBS class.

NSErrorMBS.code as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS Main Plugin 7.7 ✅ Yes ❌ No ❌ No ✅ Yes All
This is a domain specific error code.

(Read only property)

NSErrorMBS.description as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS Main Plugin 11.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the description for this object.

(Read only property)

NSErrorMBS.domain as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS Main Plugin 7.7 ✅ Yes ❌ No ❌ No ✅ Yes All
The error domain.

Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts.
(Read only property)

NSErrorMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS Main Plugin 7.7 ✅ Yes ❌ No ❌ No ✅ Yes All
The internal used handle for the NSError reference.

(Read and Write property)

NSErrorMBS.localizedDescription as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS Main Plugin 7.7 ✅ Yes ❌ No ❌ No ✅ Yes All
The localized error description.
Example
dim f as FolderItem=SpecialFolder.Desktop.Child("test.mov")
dim q as new QTKitMovieMBS(f)
dim e as NSErrorMBS

f=SpecialFolder.Desktop.Child("test2.aif")

MsgBox str(q.Handle)

if q.exportToFile(f,e,"AIFF","soun","") then
MsgBox "ok"
else
MsgBox "Fail"
end if

if e<>Nil then
MsgBox e.localizedDescription
end if

The primary user-presentable message for the error. This method can be overridden by subclassers wishing to present better error strings. By default this looks for NSLocalizedDescriptionKey in the user info. If not present, it manufactures a string from the domain and code. Also, for some of the built-in domains it knows about, it might try to fetch an error string by calling a domain-specific function. In the absence of a custom error string, the manufactured one might not be suitable for presentation to the user, but can be used in logs or debugging.
(Read only property)

NSErrorMBS.localizedFailureReason as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS Main Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a string containing the localized explanation of the reason for the error.

A string containing the localized explanation of the reason for the error. By default this method returns the object in the user info dictionary for the key NSLocalizedFailureReasonErrorKey.
This method can be overridden by subclasses to present customized error strings.
Available in Mac OS X v10.4 and later.
(Read only property)

Some examples using this property:

NSErrorMBS.localizedRecoverySuggestion as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS Main Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a string containing the localized recovery suggestion for the error.

Returns a string containing the localized recovery suggestion for the error. By default this method returns the object in the user info dictionary for the key NSLocalizedRecoverySuggestionErrorKey. If the user info dictionary doesn't contain a value for NSLocalizedRecoverySuggestionErrorKey, nil is returned.

The returned string is suitable for displaying as the secondary message in an alert panel.

This method can be overridden by subclasses to present customized recovery suggestion strings.

Available in Mac OS X v10.4 and later.
(Read only property)

Some examples using this property:

NSErrorMBS.userInfo as dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS Main Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the receiver's user info dictionary.

The receiver's user info dictionary, or nil if the user info dictionary has not been set.
(Read only property)

The items on this page are in the following plugins: MBS Main Plugin.


The biggest plugin in space...