equal
deleted
inserted
replaced
177 urgent=urgent,content=[content] } |
177 urgent=urgent,content=[content] } |
178 in |
178 in |
179 queue_or_issue pgip |
179 queue_or_issue pgip |
180 end |
180 end |
181 |
181 |
|
182 (* Note: PGIP specifies that any fatal Errorresponse which occurs before <ready/> |
|
183 indicates that the previously sent command has failed. To be 100% accurate we |
|
184 adjust the Isar top level rather than just using Output.error_msg, |
|
185 otherwise degenerate examples like ML_setup {* Output.error_msg "fake"; *} |
|
186 (and perhaps other examples involving user tactics which print errors) |
|
187 are wrongly considered to have failed. |
|
188 *) |
|
189 |
182 fun errormsg fatality s = |
190 fun errormsg fatality s = |
183 let |
191 let |
184 val content = XML.Elem("pgmltext",[],[XML.Rawtext s]) |
192 val content = XML.Elem("pgmltext",[],[XML.Rawtext s]) |
185 val pgip = Errorresponse {area=NONE,fatality=fatality, |
193 val pgip = Errorresponse {area=NONE,fatality=fatality, |
186 content=[content], |
194 content=[content], |
204 priority_fn := (fn s => normalmsg Message Normal true s); |
212 priority_fn := (fn s => normalmsg Message Normal true s); |
205 tracing_fn := (fn s => normalmsg Message Tracing false s); |
213 tracing_fn := (fn s => normalmsg Message Tracing false s); |
206 info_fn := (fn s => normalmsg Message Information false s); |
214 info_fn := (fn s => normalmsg Message Information false s); |
207 debug_fn := (fn s => normalmsg Message Internal false s); |
215 debug_fn := (fn s => normalmsg Message Internal false s); |
208 warning_fn := (fn s => errormsg Nonfatal s); |
216 warning_fn := (fn s => errormsg Nonfatal s); |
209 error_fn := (fn s => errormsg Fatal s); |
217 panic_fn := (fn s => errormsg Panic s); |
210 panic_fn := (fn s => errormsg Panic s)) |
218 error_fn := (fn s => errormsg Nonfatal s); (* was (fn s => errormsg Fatal s); *) |
|
219 Toplevel.print_exn_fn := (Option.app (errormsg Fatal) o Toplevel.print_exn_str); |
|
220 ()) |
|
221 |
211 |
222 |
212 (* immediate messages *) |
223 (* immediate messages *) |
213 |
224 |
214 fun tell_clear_goals () = issue_pgip (Cleardisplay {area=Display}) |
225 fun tell_clear_goals () = issue_pgip (Cleardisplay {area=Display}) |
215 fun tell_clear_response () = issue_pgip (Cleardisplay {area=Message}) |
226 fun tell_clear_response () = issue_pgip (Cleardisplay {area=Message}) |