Skip to content

Commit

Permalink
Tuen FS exceptions into Surge errors on Startup (surge-synthesizer#7206)
Browse files Browse the repository at this point in the history
for the FX and ModList stuff.

Closes surge-synthesizer#7205
  • Loading branch information
baconpaul committed Aug 31, 2023
1 parent 8b0eb00 commit 99b515a
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/common/SurgeStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,12 +516,25 @@ SurgeStorage::SurgeStorage(const SurgeStorage::SurgeStorageConfig &config) : oth
initPatchCategoryType = Surge::Storage::getUserDefaultValue(
this, Surge::Storage::InitialPatchCategoryType, "Factory");

fxUserPreset = std::make_unique<Surge::Storage::FxUserPreset>();
fxUserPreset->doPresetRescan(this);

modulatorPreset = std::make_unique<Surge::Storage::ModulatorPreset>();
modulatorPreset->forcePresetRescan();
try
{
fxUserPreset = std::make_unique<Surge::Storage::FxUserPreset>();
fxUserPreset->doPresetRescan(this);
}
catch (fs::filesystem_error &e)
{
reportError(e.what(), "Error Scanning FX Presets");
}

try
{
modulatorPreset = std::make_unique<Surge::Storage::ModulatorPreset>();
modulatorPreset->forcePresetRescan();
}
catch (fs::filesystem_error &e)
{
reportError(e.what(), "Error Scnning Modulator Presets");
}
memoryPools = std::make_unique<Surge::Memory::SurgeMemoryPools>(this);
}

Expand Down

0 comments on commit 99b515a

Please sign in to comment.