Skip to content

Commit

Permalink
Updated error message when exceptions are thrown by the YAML parser s…
Browse files Browse the repository at this point in the history
…ubstructure file loader.
  • Loading branch information
apsabelhaus committed Aug 11, 2016
1 parent 3001c07 commit b1d927b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/yamlbuilder/TensegrityModel.cpp
Expand Up @@ -231,15 +231,21 @@ void TensegrityModel::buildStructure(tgStructure& structure, const std::string&
{
// If a BadFile exception is thrown, output a detailed message first:
std::cout << std::endl << "The YAML parser threw a BadFile exception when" <<
" trying to load one of your substructure YAML files. " <<
" This likely means that one of the substructure files cannot be found." <<
" trying to load one of your substructure YAML files. " << std::endl <<
"The path of the structure that the parser attempted to load is: '" <<
structurePath << "'. " << "Check to be sure that the file exists, and " <<
"that it is a proper YAML file according to the specification." <<
std::endl << std::endl;

/*" This likely means that one of the substructure files cannot be found." <<
" Check if you are using relative paths for your substructures," <<
" which would mean that you need to change into a specific directory" <<
" when running this parser. " <<
" For example, writing 'path: ./Tetrahedron.yaml' assumes that the" <<
" Tetrahedron.yaml file is in your current directory. " <<
" In this example, change to the directory that contains Tetrahedron.yaml" <<
" and try to run your application again." << std::endl << std::endl;
" and try to run your application again." << std::endl << std::endl;*/

// Then, throw the exception again, so that the program stops.
throw badfileexception;
}
Expand Down

0 comments on commit b1d927b

Please sign in to comment.