Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d473920

Browse files
klemens-morgensternvinniefalco
authored andcommittedJun 12, 2023
fix: runtime errors
1 parent ea602c2 commit d473920

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed
 

‎source/Tool/ConfigImpl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ ConfigImpl(
7878
namespace path = llvm::sys::path;
7979

8080
if(! files::isAbsolute(workingDir_))
81-
throw Error("path \"{}\" is not absolute", workingDir_);
81+
throw Error("working path \"{}\" is not absolute", workingDir_);
8282
workingDir = files::makeDirsy(files::normalizePath(workingDir_));
8383

8484
if(auto err = files::requireDirectory(addonsDir_))
85-
throw Error("path \"{}\" is not absolute", addonsDir_);
85+
throw Error("addons path \"{}\" is not absolute", addonsDir_);
8686
MRDOX_ASSERT(files::isDirsy(addonsDir_));
8787
addonsDir = addonsDir_;
8888

‎source/Tool/ConfigImpl.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ loadConfigString(
255255
std::string_view addonsDir,
256256
std::string_view configYaml)
257257
{
258-
return createConfigFromYAML(workingDir, configYaml, "");
258+
return createConfigFromYAML(workingDir, addonsDir, configYaml);
259259
}
260260

261261
} // mrdox

‎source/Tool/TestAction.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ makeConfig(
145145
std::error_code ec;
146146
auto config = loadConfigString(
147147
workingDir, toolArgs.addonsDir, configYaml);
148+
if (!config)
149+
reportError(config.getError(), "load the configuration string");
148150
MRDOX_ASSERT(config);
149151
return *config;
150152
}

0 commit comments

Comments
 (0)
Please sign in to comment.