File: testxml_support.adb

package info (click to toggle)
libxmlada 18-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,324 kB
  • sloc: ada: 32,766; makefile: 480; xml: 111; sh: 43; python: 35
file content (27 lines) | stat: -rw-r--r-- 685 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
with DOM.Readers;      use DOM.Readers;
with GNAT.OS_Lib;      use GNAT.OS_Lib;
with Sax.Exceptions;   use Sax.Exceptions;

package body Testxml_Support is

   -----------
   -- Error --
   -----------

   procedure Error
     (Handler : in out My_Tree_Reader;
      Except  : Sax.Exceptions.Sax_Parse_Exception'Class)
   is
      Tmp : String_Access := Handler.Error_Msg;
   begin
      if Tmp = null then
         Handler.Error_Msg := new String'(Get_Message (Except));
      else
         Handler.Error_Msg := new String'
           (Tmp.all & ASCII.LF & Get_Message (Except));
         Free (Tmp);
      end if;
      Handler.Had_Error := True;
   end Error;

end Testxml_Support;