#include "writer.hpp"
#include "physfs/physfs_stream.hpp"
+#include "msg.hpp"
namespace lisp
{
Writer::~Writer()
{
if(lists.size() > 0) {
- std::cerr << "Warning: Not all sections closed in lispwriter!\n";
+ msg_warning("Not all sections closed in lispwriter");
}
if(out_owned)
delete out;
Writer::end_list(const std::string& listname)
{
if(lists.size() == 0) {
- std::cerr << "Trying to close list '" << listname
- << "', which is not open.\n";
+ msg_warning("Trying to close list '" << listname
+ << "', which is not open");
return;
}
if(lists.back() != listname) {
- std::cerr << "Warning: trying to close list '" << listname
- << "' while list '" << lists.back() << "' is open.\n";
+ msg_warning("trying to close list '" << listname
+ << "' while list '" << lists.back() << "' is open");
return;
}
lists.pop_back();