Commit graph

9 commits

Author SHA1 Message Date
Justin Leitgeb
10f13d107d Modify code to follow hlint suggestions 2013-10-11 20:50:44 -04:00
Justin Leitgeb
952c02fabf Improve error messages when elm input file or binary can't be found
There are a few problems currently with the elm server:

  1. When the elm binary is not found, a nondescript error is displayed
  2. When a file has a suffix .elm but the file is not found, the same error
     as in (1) is displayed
  3. When a non-existing file ending in .elm is requested, the error code is
     incorrect - the elm-server returns a 400 instead of a 404

The following is the error message that shows up in cases (1) and (2) above:

    Server error: elm-server-cache: getDirectoryContents: does not exist (No such file or directory)

This commit fixes the generic runtime errors (source of (1) and (2) above) by
guarding against trying to delete a non-existing directory. It also fixes the
HTTP code for non-existing .elm files by returning the general Happstack 404
page that is returned for other not-found requests.
2013-10-11 20:44:29 -04:00
Justin Leitgeb
05dbca5120 Fit code within 80 characters 2013-10-11 09:04:11 -05:00
Evan Czaplicki
3d570aa011 Show error messages in browser with elm-server 2013-08-10 23:01:37 -07:00
Evan Czaplicki
0f400da42f Update elm-server to work with 0.9, compiles multiple files 2013-08-10 00:51:29 -07:00
Laszlo Pandy
c24f04b243 [elm-server] add --port=... command line option. 2013-06-04 11:41:00 +02:00
evancz
fb07818e87 Fix file handle problem.
When there was a parse error, Windows would keep the file handle open because the file was only partially read.
2013-05-30 08:02:44 -07:00
evancz
be72e868ee Fix the server 2013-04-28 22:17:51 -07:00
evancz
9a0fad5b58 Rename elm-server/ to server/ 2013-03-09 19:16:43 -08:00
Renamed from elm-server/Server.hs (Browse further)