blob: 850cbfa99d7e478c8f41b3fc613df8794ccadc83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# This example shows what happens when an unhandled exception occurs in the main loop.
import nigui
app.init()
var window = newWindow()
var container = newLayoutContainer(Layout_Vertical)
window.add(container)
var button = newButton("Raise Exception")
container.add(button)
button.onClick = proc(event: ClickEvent) =
raise newException(Exception, "Test Exception")
window.show()
app.run()
|