mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-15 19:48:00 +01:00
mangle: direct messages to std::cerr rather than collecting them up into a stringstream
This commit is contained in:
parent
bbbdcf7593
commit
3454ba8809
1 changed files with 3 additions and 6 deletions
|
@ -20,11 +20,10 @@ int main(int argc, const char* argv[])
|
|||
return 0;
|
||||
} // if ...
|
||||
|
||||
Arabica::XSLT::StylesheetCompiler<std::string> compiler;
|
||||
std::ostringstream errors;
|
||||
try
|
||||
try
|
||||
{
|
||||
Arabica::SAX::InputSource<std::string> source(argv[2]);
|
||||
Arabica::XSLT::StylesheetCompiler<std::string> compiler;
|
||||
std::unique_ptr<Arabica::XSLT::Stylesheet<std::string> > stylesheet = compiler.compile(source);
|
||||
if(stylesheet.get() == 0)
|
||||
{
|
||||
|
@ -32,7 +31,7 @@ int main(int argc, const char* argv[])
|
|||
return -1;
|
||||
} // if ...
|
||||
|
||||
stylesheet->set_error_output(errors);
|
||||
stylesheet->set_error_output(std::cerr);
|
||||
|
||||
Arabica::DOM::Document<std::string> document = buildDOM(argv[1]);
|
||||
if(document == 0)
|
||||
|
@ -47,8 +46,6 @@ int main(int argc, const char* argv[])
|
|||
std::cerr << ex.what() << std::endl;
|
||||
} // catch
|
||||
|
||||
std::cerr << "\n\n" << errors.str() << std::endl;
|
||||
|
||||
return 0;
|
||||
} // main
|
||||
|
||||
|
|
Loading…
Reference in a new issue