Files
xmlada/tests/dom/testxml_support.adb
Emmanuel Briot 63b47c6599 Reorganize testsuites
Move all the */test/ directories to tests/*
Move all tests that potentially contain customer code or data to tests/adacore
 These will be moved to a separate git repository

Part of O527-038

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/xmlada@240170 936e1b1b-40f2-da11-902a-00137254ae57
2015-07-09 15:17:03 +02:00

28 lines
685 B
Ada

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;