GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: A new revision of Fuzed, the Erlang-based frontend for web apps. Check out the mailing list at http://groups.google.com/group/fuzed
Clone URL: git://github.com/KirinDave/fuzed.git
commit  e1f91c9bda7a3ee3f23074c28551196e0194a5f5
tree    ce1ab13fa4a67925d9ac46c1d2d8d58b6ccef0ce
parent  b5ae846ccea12fd2b3c1a646449e9463c32c4e46
fuzed / elibs / frameworks / rails_framework.erl
100644 14 lines (13 sloc) 0.349 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-module(rails_framework).
-export([crashmsg/3]).
-include("yaws_api.hrl").
-include("yaws.hrl").
 
crashmsg(Arg, _SC, Str) ->
  Docroot = Arg#arg.docroot,
  Path500 = filename:join([Docroot, "500.html"]),
  case file:read_file(Path500) of
    {ok, Binary} ->
      {html, Binary};
    {error, _Reason} ->
      {html, ["<pre>", Str, "</pre>"]}
  end.