diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-05-06 11:50:07 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-05-09 08:41:05 +0300 |
commit | f4088defa1d8de5b6d5060bfd2021a23f691f718 (patch) | |
tree | d346efed890a8d36ffa270c6f11112658d7a91a7 /src/error.rs | |
parent | aefd93fb14b4781deca481d2a21953c9fd30f361 (diff) | |
download | subplot-f4088defa1d8de5b6d5060bfd2021a23f691f718.tar.gz |
Change: use a base directory for relative paths
This moves the policy decision of what the base directory is to the
main functions of the various programs, instead of hiding it deep in
the call stack and making it implicitly the current working directory.
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index 3d28d3b..69013b8 100644 --- a/src/error.rs +++ b/src/error.rs @@ -114,6 +114,15 @@ pub enum SubplotError { #[error("Duplicate embedded file name: {0}")] DuplicateEmbeddedFilename(String), + /// Couldn't determine base directory from input file name. + /// + /// Subplot needs to to determine the base directory for files + /// referred to by the markdown input file (e.g., bindings and + /// functions files). It failed to do that from the name of the + /// input file. Something weird is happening. + #[error("Could not determine base directory for included files from {0:?}")] + BasedirError(PathBuf), + /// Output goes into a directory that does not exist. /// /// Subplot needs to know in which directory it should write its |