Skip to content
Snippets Groups Projects
Commit 6038a1b0 authored by Tinny Ng's avatar Tinny Ng
Browse files

[Bug 15928] Output with LocalFileFormatTarget fails silently.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@174608 13f79535-47bb-0310-9956-ffa450edef68
parent 12929703
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,9 @@
/*
* $Id$
* $Log$
* Revision 1.4 2003/01/09 20:59:44 tng
* [Bug 15928] Output with LocalFileFormatTarget fails silently.
*
* Revision 1.3 2002/11/27 18:09:25 tng
* [Bug 13447] Performance: Using LocalFileFormatTarget with DOMWriter is very slow.
*
......@@ -71,6 +74,7 @@
#include <xercesc/framework/LocalFileFormatTarget.hpp>
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/IOException.hpp>
#include <string.h>
XERCES_CPP_NAMESPACE_BEGIN
......@@ -83,6 +87,9 @@ LocalFileFormatTarget::LocalFileFormatTarget(const XMLCh* const fileName)
{
fSource = XMLPlatformUtils::openFileToWrite(fileName);
if (!fSource)
ThrowXML1(IOException, XMLExcepts::File_CouldNotOpenFile, fileName);
// Buffer is one larger than capacity, to allow for zero term
fDataBuf = new XMLByte[fCapacity+4];
......@@ -99,6 +106,9 @@ LocalFileFormatTarget::LocalFileFormatTarget(const char* const fileName)
{
fSource = XMLPlatformUtils::openFileToWrite(fileName);
if (!fSource)
ThrowXML1(IOException, XMLExcepts::File_CouldNotOpenFile, fileName);
// Buffer is one larger than capacity, to allow for zero term
fDataBuf = new XMLByte[fCapacity+4];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment