aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/errors.ml
diff options
context:
space:
mode:
Diffstat (limited to 'toplevel/errors.ml')
-rw-r--r--toplevel/errors.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/toplevel/errors.ml b/toplevel/errors.ml
index 6c76e5e88..cde9421d0 100644
--- a/toplevel/errors.ml
+++ b/toplevel/errors.ml
@@ -76,6 +76,10 @@ let rec explain_exn_default = function
hOV 0 [< 'sTR "Syntax error: Unterminated comment." >]
| Lexer.Error Unterminated_string ->
hOV 0 [< 'sTR "Syntax error: Unterminated string." >]
+ | Lexer.Error Undefined_token ->
+ hOV 0 [< 'sTR "Syntax error: Undefined token." >]
+ | Lexer.Error (Bad_token s) ->
+ hOV 0 [< 'sTR "Syntax error: Bad token"; 'sPC; 'sTR s; 'sTR "." >]
| reraise ->
hOV 0 [< 'sTR "Anomaly: Uncaught exception ";
'sTR (Printexc.to_string reraise); report () >]