adds error catching for empty pages
moves index page to blog post format rather than static page
This commit is contained in:
parent
63fc2fa47f
commit
06b45e46c9
2 changed files with 2 additions and 39 deletions
|
@ -4,6 +4,8 @@
|
|||
void Page::calculatePageFlags()
|
||||
{
|
||||
int endOfFirstLine = sourceFileContents.find_first_of("\n");
|
||||
if (endOfFirstLine == -1)
|
||||
throw sourceFileUrl + " is empty or all on one line";
|
||||
std::string tagLine = sourceFileContents.substr(0, endOfFirstLine);
|
||||
sourceFileContents = sourceFileContents.substr(endOfFirstLine, sourceFileContents.length()-endOfFirstLine);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue