diff --git a/doomsday/libdeng2/src/core/config.cpp b/doomsday/libdeng2/src/core/config.cpp index bc1e4f1422..a6e0b20d4e 100644 --- a/doomsday/libdeng2/src/core/config.cpp +++ b/doomsday/libdeng2/src/core/config.cpp @@ -112,7 +112,7 @@ void Config::read() // If script is newer, it should be rerun. if(scriptFile.status().modifiedAt > d->refuge.lastWrittenAt()) { - LOG_MSG("%s is newer than %s, rerunning the script.") + LOG_MSG("%s is newer than %s, rerunning the script") << d->configPath << d->refuge.path(); shouldRunScript = true; } @@ -122,6 +122,11 @@ void Config::read() // It is missing from persist.pack if the config hasn't been written yet. shouldRunScript = true; } + catch(IByteArray::OffsetError const &) + { + // Empty or missing serialization? + shouldRunScript = true; + } catch(Error const &error) { LOG_WARNING(error.what()); diff --git a/doomsday/libdeng2/src/data/block.cpp b/doomsday/libdeng2/src/data/block.cpp index 8bfe8145b5..39c667b423 100644 --- a/doomsday/libdeng2/src/data/block.cpp +++ b/doomsday/libdeng2/src/data/block.cpp @@ -75,7 +75,8 @@ void Block::get(Offset atPos, Byte *values, Size count) const if(atPos + count > size()) { /// @throw OffsetError The accessed region of the block was out of range. - throw OffsetError("Block::get", "Out of range"); + throw OffsetError("Block::get", "Out of range " + + String("(%1[+%2] > %3)").arg(atPos).arg(count).arg(size())); } for(Offset i = atPos; count > 0; ++i, --count) diff --git a/doomsday/libdeng2/src/filesys/nativefile.cpp b/doomsday/libdeng2/src/filesys/nativefile.cpp index de5baa25a6..7567cbdadd 100644 --- a/doomsday/libdeng2/src/filesys/nativefile.cpp +++ b/doomsday/libdeng2/src/filesys/nativefile.cpp @@ -98,7 +98,8 @@ void NativeFile::get(Offset at, Byte *values, Size count) const { /// @throw IByteArray::OffsetError The region specified for reading extends /// beyond the bounds of the file. - throw OffsetError("NativeFile::get", "Cannot read past end of file"); + throw OffsetError("NativeFile::get", description() + ": cannot read past end of file " + + String("(%1[+%2] > %3)").arg(at).arg(count).arg(size())); } in.seek(at); in.read(reinterpret_cast(values), count);