Documentation ¶
Overview ¶
Package exceptions handles JavaScript errors nicely for the game.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Supervisor *ui.Supervisor Window *ui.Window Disabled bool // don't reopen the window again )
The exception catching window is a singleton and appears on top with its own supervisor apart from whatever the game is currently doing.
Functions ¶
func Catch ¶
func Catch(exc string, args ...interface{})
Catch a JavaScript exception and maybe show it to the user.
func FormatAndCatch ¶
FormatAndCatch an exception from a JavaScript VM. This is the common function called immediately when a scripting-related panic is recovered, and appends stack trace frames and formats the message for final Catch display.
func Handled ¶
Handled returns true if the exception window handles the events this tick, e.g. so clicking on its window won't let your mouse click also hit things behind it.
Types ¶
Click to show internal directories.
Click to hide internal directories.