#include "lisp/lisp.hpp"
#include "lisp/list_iterator.hpp"
#include "object_factory.hpp"
-#include "msg.hpp"
+#include "log.hpp"
#include <assert.h>
#include <iostream>
if(iter.item() == "mode") {
std::string mode_string;
if(!iter.value()->get(mode_string))
- throw new std::runtime_error("Pathmode not a string");
+ throw std::runtime_error("Pathmode not a string");
if(mode_string == "oneshot")
mode = ONE_SHOT;
else {
std::ostringstream msg;
msg << "Unknown pathmode '" << mode_string << "' found";
- throw new std::runtime_error(msg.str());
+ throw std::runtime_error(msg.str());
}
continue;
}
if(iter.item() != "node") {
- msg_warning("unknown token '" << iter.item() << "' in Path nodes list. Ignored.");
+ log_warning << "unknown token '" << iter.item() << "' in Path nodes list. Ignored." << std::endl;
continue;
}
const lisp::Lisp* node_lisp = iter.lisp();
node.time = 1;
if( (!node_lisp->get("x", node.position.x) ||
!node_lisp->get("y", node.position.y)))
- throw new std::runtime_error("Path node without x and y coordinate specified");
+ throw std::runtime_error("Path node without x and y coordinate specified");
node_lisp->get("time", node.time);
if(node.time <= 0)
writer.write_string("mode", "circular");
break;
default:
- msg_warning("Don't know how to write mode " << (int) mode << " ?!?");
+ log_warning << "Don't know how to write mode " << (int) mode << " ?!?" << std::endl;
break;
}