Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ namespace qvac::ttslib {
inline std::string loadFileBytes(const std::string &path) {
std::ifstream f(path, std::ios::binary | std::ios::ate);
if (!f)
throw std::runtime_error("Cannot open file: " + path);
throw std::runtime_error("Cannot open required model file");
const size_t size = static_cast<size_t>(f.tellg());
f.seekg(0);
std::string data(size, '\0');
if (!f.read(data.data(), size))
throw std::runtime_error("Failed to read file: " + path);
throw std::runtime_error("Failed to read required model file");
return data;
}

Expand Down
Loading