/client/shaders/minimap_shader/

='2'>cgit logo index : minetest.git
modified minetest for gpcfs purposesgpcf
aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods/errorhandler_test/init.lua
blob: 9d1535c1d834c808ac69ed577d6f91b36317e14c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
--
-- exception handler test module
--
--
-- To avoid this from crashing the module will startup in inactive mode.
-- to make specific errors happen you need to cause them by following
-- chat command:
--
-- exceptiontest <location> <errortype>
--
-- location has to be one of:
--   * mapgen:          cause in next on_generate call
--   * entity_step:     spawn a entity and make it do error in on_step
--   * globalstep:      do error in next globalstep
--   * immediate:       cause right in chat handler
--
-- errortypes defined are:
--   * segv:            make sigsegv happen
--   * zerodivision:    cause a division by zero to happen
--   * exception:       throw an exception

if core.cause_error == nil or
	type(core.cause_error) ~= "function" then
	return
end
	

core.log("action", "WARNING: loading exception handler test module!")