changeset 1809:b8fa7441e637

Add list of files to new error message
author Adam Chlipala <adam@chlipala.net>
date Sat, 18 Aug 2012 13:57:48 -0400 (2012-08-18)
parents 90ebfac7e1a3
children b8558b613abd
files src/main.mlton.sml
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.mlton.sml	Sat Aug 18 13:51:41 2012 -0400
+++ b/src/main.mlton.sml	Sat Aug 18 13:57:48 2012 -0400
@@ -169,9 +169,10 @@
         val job =
             case !sources of
                 [file] => file
-              | _ =>
+              | files =>
                 if List.exists (fn s => s <> "-version") args then
-                    raise Fail "Zero or multiple input files specified; only one is allowed."
+                    raise Fail ("Zero or multiple input files specified; only one is allowed.\nFiles: "
+                                ^ String.concatWith ", " files)
                 else
                     printVersion ()
     in