int ret = write(p, size);
if ( ret != size )
{
- throw ostream_exception("ostream: write error.", p, size, ret);
+ throw ostream_exception("roast::ostream_base::_write(const void*, size): write size is not match.", p, size, ret);
}
return ret;
}
int _write(char c){
int ret = write(c);
- if ( c != 1 )
+ if ( ret != 1 )
{
- throw ostream_exception("ostream: write error.");
+ throw ostream_exception("roast::ostream_base::_write(char): write size is not 1.");
}
return ret;
}
private:
::std::string m_strbuf;
::std::string &m_ref;
+
+ public:
+ static const char* class_name;
public:
string_output_stream() : m_ref(m_strbuf) {}
string_output_stream(::std::string &s) : m_ref(s) {}
return m_ref;
}
};
+
+ const char* string_output_stream::class_name = "string_output_stream";
}
using stream::string_output_stream;
}