X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fapp.cpp;fp=src%2Fapp.cpp;h=af552b564501ef95f41b2cc2822adbc49faca4a7;hb=0b1d9ca2550bdb877d065a74e4debcc95c4e7b98;hp=ba258b5bed8844b902f10d7c8c66efd4bb37f2ad;hpb=2b97202f86c492be91de83a93b513384871f321d;p=apps%2Fagl-service-windowmanager-2017.git diff --git a/src/app.cpp b/src/app.cpp index ba258b5..af552b5 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -44,12 +44,16 @@ namespace { using nlohmann::json; result file_to_json(char const *filename) { + json j; std::ifstream i(filename); if (i.fail()) { - return Err("Could not open config file"); + HMI_DEBUG("wm", "Could not open config file, so use default layer information"); + j = default_layers_json; } - json j; - i >> j; + else { + i >> j; + } + return Ok(j); }