PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/yolk-whoops.ads

http://github.com/ThomasLocke/yolk
Ada | 38 lines | 11 code | 4 blank | 23 comment | 0 complexity | 7588f2f4d746e9604c56b186127698a7 MD5 | raw file
 1-------------------------------------------------------------------------------
 2--                                                                           --
 3--                   Copyright (C) 2010-, Thomas Løcke                   --
 4--                                                                           --
 5--  This library is free software;  you can redistribute it and/or modify    --
 6--  it under terms of the  GNU General Public License  as published by the   --
 7--  Free Software  Foundation;  either version 3,  or (at your  option) any  --
 8--  later version. This library is distributed in the hope that it will be   --
 9--  useful, but WITHOUT ANY WARRANTY;  without even the implied warranty of  --
10--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     --
11--                                                                           --
12--  As a special exception under Section 7 of GPL version 3, you are         --
13--  granted additional permissions described in the GCC Runtime Library      --
14--  Exception, version 3.1, as published by the Free Software Foundation.    --
15--                                                                           --
16--  You should have received a copy of the GNU General Public License and    --
17--  a copy of the GCC Runtime Library Exception along with this program;     --
18--  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
19--  <http://www.gnu.org/licenses/>.                                          --
20--                                                                           --
21-------------------------------------------------------------------------------
22
23with Ada.Exceptions;
24with AWS.Exceptions;
25with AWS.Log;
26with AWS.Response;
27
28package Yolk.Whoops is
29
30   procedure Unexpected_Exception_Handler
31     (E      : Ada.Exceptions.Exception_Occurrence;
32      Log    : in out AWS.Log.Object;
33      Error  : AWS.Exceptions.Data;
34      Answer : in out AWS.Response.Data);
35   --  This one takes care of all the exceptions you've failed to catch. It
36   --  logs the problem and return a status code 500 page to the user.
37
38end Yolk.Whoops;