From 4efc0ff3168f9ff6e80b2fa4b3302baac4035abb Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 21 Jul 2015 23:38:21 -0700 Subject: 1826 - edit: start carefully showing all errors Eventually we might be able to get rid of die entirely. This is just a preliminary stab at a random error. In the process I ran into two issues that have impeded debugging before: a) Naming conflicts within scenarios are a real no-no. I need to warn on them, but the rules are getting complicated: Always print warnings on redefine But not in interactive mode Or in scenarios checking warning behavior Unless the scenario recipe itself is overridden b) Now that we've added collect_layers and a long time can go between traces, debugging is a minefield because trace lines don't print to screen immediately after they're created. Need to do something about that. Maybe explicitly trigger collection by tracing '\n' or something. These are the next two items on my todo list. --- 030container.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '030container.cc') diff --git a/030container.cc b/030container.cc index f90e92ba..c49aa877 100644 --- a/030container.cc +++ b/030container.cc @@ -107,8 +107,10 @@ case GET: { reagent base = current_instruction().ingredients.at(0); long long int base_address = base.value; type_ordinal base_type = base.types.at(0); - if (Type[base_type].kind != container) - raise << "'get' on a non-container in " << current_recipe_name () << ": " << current_instruction().to_string() << '\n' << die(); + if (Type[base_type].kind != container) { + raise << current_recipe_name () << ": 'get' on a non-container " << base.original_string << '\n'; + break; + } assert(is_literal(current_instruction().ingredients.at(1))); assert(scalar(ingredients.at(1))); long long int offset = ingredients.at(1).at(0); -- cgit 1.4.1-2-gfad0 ittests/test_cmd_account.h'>stats
path: root/tests/unittests/test_cmd_account.h
blob: 7a8d1b42e49fddbf2047505fda4d379ec05abafa (plain) (blame)
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
a>
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220