mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-24 04:20:56 -04:00
Tune a bit an error message
This commit is contained in:
parent
6a7c737d48
commit
2cd190e965
@ -84,7 +84,7 @@ string loadCustomTemplate (string customIndexPath) {
|
|||||||
kiwix::computeAbsolutePath(kiwix::getCurrentDirectory(), customIndexPath) :
|
kiwix::computeAbsolutePath(kiwix::getCurrentDirectory(), customIndexPath) :
|
||||||
customIndexPath;
|
customIndexPath;
|
||||||
if (!kiwix::fileExists(customIndexPath)) {
|
if (!kiwix::fileExists(customIndexPath)) {
|
||||||
throw runtime_error("No such file exist " + customIndexPath);
|
throw runtime_error("No such file exist (or file is not readable)" + customIndexPath);
|
||||||
}
|
}
|
||||||
if (kiwix::getMimeTypeForFile(customIndexPath) != "text/html") {
|
if (kiwix::getMimeTypeForFile(customIndexPath) != "text/html") {
|
||||||
throw runtime_error("Invalid File Mime Type " + kiwix::getMimeTypeForFile(customIndexPath));
|
throw runtime_error("Invalid File Mime Type " + kiwix::getMimeTypeForFile(customIndexPath));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user