mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-15 21:15:51 +02:00
Make yabridge.toml parsing failures non-fatal
This commit is contained in:
@@ -29,7 +29,7 @@ Configuration::Configuration() noexcept {}
|
||||
Configuration::Configuration(const fs::path& config_path,
|
||||
const fs::path& yabridge_path)
|
||||
: Configuration() {
|
||||
// Will throw a `toml::parsing_error` if the file cannot be parsed. Better
|
||||
// Will throw a `toml::parse_error` if the file cannot be parsed. Better
|
||||
// to throw here rather than failing silently since syntax errors would
|
||||
// otherwise be impossible to spot. We'll also have to sort all tables by
|
||||
// the location in the file since tomlplusplus internally uses ordered maps
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
* plugins that will be hosted in the same process rather than individually so
|
||||
* they can share resources. Configuration file loading works as follows:
|
||||
*
|
||||
* 1. `load_config_for(path)` from `src/plugin/utils.h` gets called with a path
|
||||
* to the copy of or symlink to `libyabridge-{clap,vst2,vst3}.so` that the
|
||||
* plugin host has tried to load.
|
||||
* 1. `load_config_for(path, ...)` from `src/plugin/utils.h` gets called with a
|
||||
* path to the copy of or symlink to `libyabridge-{clap,vst2,vst3}.so` that
|
||||
* the plugin host has tried to load.
|
||||
* 2. We start looking for a file named `yabridge.toml` in the same directory as
|
||||
* that `.so` file, iteratively continuing to search one directory higher
|
||||
* until we either find the file or we reach the filesystem root.
|
||||
@@ -64,7 +64,7 @@ class Configuration {
|
||||
* configuration file. Will leave the object empty if the plugin cannot be
|
||||
* matched to any of the patterns. Not meant to be used directly.
|
||||
*
|
||||
* @throw toml::parsing_error If the file could not be parsed.
|
||||
* @throw toml::parse_error If the file could not be parsed.
|
||||
*
|
||||
* @see ../plugin/utils.h:load_config_for
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user