Commit 1bda9dbf authored by Deepak Rangarajan's avatar Deepak Rangarajan
Browse files

update throw msg

parent 4d6cba1a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -729,7 +729,8 @@ std::shared_ptr<Tree> parse_csg(std::string str) {
  auto st = maybe_state.value();

  if (st.current_3d_objs.size() != 1)
    throw std::runtime_error("Error parsing. Check input!");
    throw std::runtime_error(
        "Error parsing. Somehow created a bad top level object!");

  Tree tree;
  for (auto obj : st.current_3d_objs.back()) {
@@ -738,7 +739,8 @@ std::shared_ptr<Tree> parse_csg(std::string str) {

  if (tree.top.objs.empty())
    throw std::runtime_error(
        "Error parsing. Check input!"); // Disallow empty .csg file
        "Error parsing. Empty object tree created!"); // Disallow empty .csg
                                                      // file

  return std::make_shared<Tree>(tree);
}