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.


The biggest plugin in space...