SignalHandlerMBS events

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Back to SignalHandlerMBS class.

SignalHandlerMBS.Signal(n as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event System MBS Util Plugin 8.5 ✅ Yes ❌ No ✅ Yes ❌ No
A signal was called and you set an event handler.
Example
Sub Signal(n as Integer)
// restore system handler in case we get that crash again!

MySignalHandlerMBS.SetDefaultHandler n

// Mac and Linux can have different signal numbers:

#if TargetMacOS then
dim c as string = "Signal "+str(n)+" on Mac OS X"
#elseif TargetLinux then
dim c as string = "Signal "+str(n)+" on Linux"
#else
dim c as string = "Signal "+str(n)+" on ?"
#endif

dim BackTraceLines() as string
#if mbs.BuildNumber>17662 and not TargetWin32 then // new in 13.0 plugins
BackTraceLines = BacktraceMBS
#endif

// show your bug reporter (or the MBS one)
'dim b as new Bugreporter
'b.ShowExceptionReporter c, BackTraceLines

// quit now without cleaning up the RB runtime which may crash again
ExitMBS 1
End Sub

This function may be called at any time, so you need to use code which is thread safe. (see ThreadMBS class)

Some examples using this event:

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


💬 Ask a question or report a problem