diff options
author | psychocrypt <psychocryptHPC@gmail.com> | 2018-03-31 20:17:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-31 20:17:20 +0200 |
commit | 4879048c494d29ae00d9a8bba00e9ef1e3dc10e6 (patch) | |
tree | f5f2949dc84586716aacc59684cfb585f3d93e46 /xmrstak/backend/amd | |
parent | a885f60dbb0a23a821f2c6a0113699381b46ffd2 (diff) | |
parent | 594c987e4ba86a23c61c86874624b3b2c329a047 (diff) | |
download | xmr-stak-4879048c494d29ae00d9a8bba00e9ef1e3dc10e6.zip xmr-stak-4879048c494d29ae00d9a8bba00e9ef1e3dc10e6.tar.gz |
Merge pull request #1262 from fireice-uk/topic-backend-errors
Add filename to backend errors
Diffstat (limited to 'xmrstak/backend/amd')
-rw-r--r-- | xmrstak/backend/amd/jconf.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmrstak/backend/amd/jconf.cpp b/xmrstak/backend/amd/jconf.cpp index 93ba709..0f39ff2 100644 --- a/xmrstak/backend/amd/jconf.cpp +++ b/xmrstak/backend/amd/jconf.cpp @@ -234,15 +234,15 @@ bool jconf::parse_config(const char* sFilename) if(prv->jsonDoc.HasParseError()) { - printer::inst()->print_msg(L0, "JSON config parse error(offset %llu): %s", - int_port(prv->jsonDoc.GetErrorOffset()), GetParseError_En(prv->jsonDoc.GetParseError())); + printer::inst()->print_msg(L0, "JSON config parse error in '%s' (offset %llu): %s", + sFilename, int_port(prv->jsonDoc.GetErrorOffset()), GetParseError_En(prv->jsonDoc.GetParseError())); return false; } if(!prv->jsonDoc.IsObject()) { //This should never happen as we created the root ourselves - printer::inst()->print_msg(L0, "Invalid config file. No root?\n"); + printer::inst()->print_msg(L0, "Invalid config file '%s'. No root?", sFilename); return false; } @@ -258,13 +258,13 @@ bool jconf::parse_config(const char* sFilename) if(prv->configValues[i] == nullptr) { - printer::inst()->print_msg(L0, "Invalid config file. Missing value \"%s\".", oConfigValues[i].sName); + printer::inst()->print_msg(L0, "Invalid config file '%s'. Missing value \"%s\".", sFilename, oConfigValues[i].sName); return false; } if(!checkType(prv->configValues[i]->GetType(), oConfigValues[i].iType)) { - printer::inst()->print_msg(L0, "Invalid config file. Value \"%s\" has unexpected type.", oConfigValues[i].sName); + printer::inst()->print_msg(L0, "Invalid config file '%s'. Value \"%s\" has unexpected type.", sFilename, oConfigValues[i].sName); return false; } } |