Platforms to show: All Mac Windows Linux Cross-Platform

NSExceptionMBS class

Super class: RuntimeException

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa MBS Main Plugin 7.4 ✅ Yes ❌ No ❌ No ✅ Yes All
The Cocoa exception class.
Example
dim m1 as new NSMenuMBS
dim m2 as new NSMenuMBS
dim n as new NSMenuItemMBS

n.CreateMenuItem

m1.addItem n
m2.addItem n // raises an exception as a menuitem can't be in two menus.

Exception e as NSExceptionMBS
MsgBox e.Message

// e.reason: "Item to be inserted into menu already is in another menu"
// e.name: "NSInternalInconsistencyException"
// e.message: "A Cocoa NSInternalInconsistencyException was not handled: Item to be inserted into menu already is in another menu"

The plugin installs exception handling code. If you use the NSExceptionMBS class somewhere in your code, the NSException plugin part will be included and a NSExceptionMBS object will be
Subclass of the RuntimeException class.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Constants

Constant Value Description
NSDestinationInvalidException "NSDestinationInvalidException" One of the exception names.
NSGenericException "NSGenericException" One of the exception names.
NSInternalInconsistencyException "NSInternalInconsistencyException" One of the exception names.
NSInvalidArgumentException "NSInvalidArgumentException" One of the exception names.
NSInvalidReceivePortException "NSInvalidReceivePortException" One of the exception names.
NSInvalidSendPortException "NSInvalidSendPortException" One of the exception names.
NSMallocException "NSMallocException" One of the exception names.
NSObjectInaccessibleException "NSObjectInaccessibleException" One of the exception names.
NSObjectNotAvailableException "NSObjectNotAvailableException" One of the exception names.
NSPortReceiveException "NSPortReceiveException" One of the exception names.
NSPortSendException "NSPortSendException" One of the exception names.
NSPortTimeoutException "NSPortTimeoutException" One of the exception names.
NSRangeException "NSRangeException" One of the exception names.

This class has no sub classes.

Some events using this class:

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes

  • Version 23.0

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


NSExceptionHandlerMBS   -   NSExpressionMBS


The biggest plugin in space...