Skip to content
Snippets Groups Projects
Commit 8ed2ab62 authored by Thomas Moulard's avatar Thomas Moulard
Browse files

Enhance run command error message.

parent 24fe1bed
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,8 @@
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <boost/format.hpp>
/* DYNAMIC-GRAPH */
#include <dynamic-graph/interpreter.h>
#include <dynamic-graph/plugin-loader.h>
......@@ -285,9 +287,10 @@ cmdRun( const std::string& cmdLine, std::istringstream& cmdArg, std::ostream& os
ifstream script( filename.c_str(),ios::in );
if(! script.is_open() )
{
DG_THROW ExceptionFactory( ExceptionFactory::READ_FILE,
"File is not open."," (while reading <%s>).",
filename.c_str() );
boost::format fmt
("failed to run file ``%1%'' (file does not exist or is not readable).");
fmt % filename;
DG_THROW ExceptionFactory (ExceptionFactory::READ_FILE, fmt.str ());
}
const int SIZE = 16384;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment