Commits

Morel Bérenger committed 3f1cda7

replace an assertion by an exception

Comments (0)

Files changed (1)

src/gui/wxadapter.h

 template <typename NodeType>
 Node<NodeType> createTree(fs::path const& origin)
 {
-	assert(fs::exists(origin));
+	if(!fs::exists(origin))
+		throw std::runtime_error(origin.string()+"does not exists\n");
 
 	Node<NodeType> f(origin);
 	for(auto it=fs::directory_iterator(origin);it!=fs::directory_iterator();++it)