comparison src/errormsg.sml @ 1748:95dd9f427bb2

Fix from Edward Yang to generation of 404 errors in FastCGI
author Adam Chlipala <adam@chlipala.net>
date Sun, 06 May 2012 12:37:43 -0400
parents 9b54fbe1efdb
children
comparison
equal deleted inserted replaced
1747:9b54fbe1efdb 1748:95dd9f427bb2
93 fun anyErrors () = !errors 93 fun anyErrors () = !errors
94 fun error s = (TextIO.output (TextIO.stdErr, s); 94 fun error s = (TextIO.output (TextIO.stdErr, s);
95 TextIO.output1 (TextIO.stdErr, #"\n"); 95 TextIO.output1 (TextIO.stdErr, #"\n");
96 errors := true) 96 errors := true)
97 97
98 fun errorAt span s = (TextIO.output (TextIO.stdErr, #file span); 98 fun errorAt (span : span) s = (TextIO.output (TextIO.stdErr, #file span);
99 TextIO.output (TextIO.stdErr, ":"); 99 TextIO.output (TextIO.stdErr, ":");
100 TextIO.output (TextIO.stdErr, posToString (#first span)); 100 TextIO.output (TextIO.stdErr, posToString (#first span));
101 TextIO.output (TextIO.stdErr, ": (to "); 101 TextIO.output (TextIO.stdErr, ": (to ");
102 TextIO.output (TextIO.stdErr, posToString (#last span)); 102 TextIO.output (TextIO.stdErr, posToString (#last span));
103 TextIO.output (TextIO.stdErr, ") "); 103 TextIO.output (TextIO.stdErr, ") ");
104 error s) 104 error s)
105 fun errorAt' span s = errorAt (spanOf span) s 105 fun errorAt' span s = errorAt (spanOf span) s
106 106
107 end 107 end