Make error reporting slightly more regular.
This commit is contained in:
parent
14262c7311
commit
10316fbfa5
@ -109,7 +109,7 @@ let report_err sess ido str =
|
||||
in
|
||||
match spano with
|
||||
None ->
|
||||
fail sess "Error: %s\n%!" str
|
||||
fail sess "error: %s\n%!" str
|
||||
| Some span ->
|
||||
fail sess "%s: error: %s\n%!"
|
||||
(string_of_span span) str
|
||||
|
@ -602,10 +602,11 @@ let with_err_handling sess thunk =
|
||||
thunk ()
|
||||
with
|
||||
Parse_err (ps, str) ->
|
||||
Session.fail sess "Parse error: %s\n%!" str;
|
||||
Session.fail sess "%s: error: %s\n%!"
|
||||
(Session.string_of_pos (lexpos ps)) str;
|
||||
List.iter
|
||||
(fun (cx,pos) ->
|
||||
Session.fail sess "%s:E (parse context): %s\n%!"
|
||||
Session.fail sess "%s: (parse context): %s\n%!"
|
||||
(Session.string_of_pos pos) cx)
|
||||
ps.pstate_ctxt;
|
||||
let apos = lexpos ps in
|
||||
|
Loading…
Reference in New Issue
Block a user