[xsd-users] unhandled exception at memory...tree/parsing problem
Boris Kolpackov
boris at codesynthesis.com
Tue Nov 18 08:52:08 EST 2008
Hi Azadeh,
Azadeh Omrani <a.omrani at gmail.com> writes:
> Trying to run an official example in
> .\xsd-3.2.0-i686-windows\examples\cxx\tree\hello class structure was created
> successfully.
> But trying to parse hello.xml by driver.cxx I got the following error:
>
> Unhandled exception at 0x7c812aeb in driver.exe : Microsoft C++ exception :
> xsd::cxx::tree::parsing<char> at memory location 0x0012fb04
The hello example that comes with XSD catches and prints
xml_schema::exception from which xml_schema::parsing is derived.
So you shouldn't get unhandled exception. Can you make sure
the parsing code in driver.cxx is inside the try-catch block:
try
{
auto_ptr<hello_t> h (hello (argv[1]));
for (hello_t::name_const_iterator i (h->name ().begin ());
i != h->name ().end ();
++i)
{
cout << h->greeting () << ", " << *i << "!" << endl;
}
}
catch (const xml_schema::exception& e)
{
cerr << e << endl;
return 1;
}
Boris
More information about the xsd-users
mailing list