|
@@ -30,9 +30,16 @@ void dec_yaml(const char * stryamlpath)
|
|
{
|
|
{
|
|
config = YAML::LoadFile(stryamlpath);
|
|
config = YAML::LoadFile(stryamlpath);
|
|
}
|
|
}
|
|
- catch(...)
|
|
|
|
|
|
+ catch(YAML::BadFile &e)
|
|
{
|
|
{
|
|
- qDebug("yaml file has some unknown characters or load fail.");
|
|
|
|
|
|
+ std::cout<<e.what()<<std::endl;
|
|
|
|
+ qDebug("yaml file load fail.");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ catch(YAML::ParserException &e)
|
|
|
|
+ {
|
|
|
|
+ std::cout<<e.what()<<std::endl;
|
|
|
|
+ qDebug("yaml file is malformed.");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|