Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

NSExceptionMBS class

Super class: RuntimeException

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa MBS Main Plugin 7.4 Yes No No Yes, macOS only No
Function: 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"
Notes:
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.

Feedback, Comments & Corrections

This class has no sub classes.

Some events for this class:

Some examples which use this class:


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


NSExceptionHandlerMBS   -   NSExpressionMBS




Links
MBS Xojo tutorial videos