From 96ca9500ca1870ee2d6a4ebea8ea19c6dea013eb Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 10 May 2014 13:47:22 +0200 Subject: [PATCH] generate error messages when encounting non-critical problems during load --- apps/opencs/model/world/data.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/opencs/model/world/data.cpp b/apps/opencs/model/world/data.cpp index 2de58675fa..3e9fe11eb0 100644 --- a/apps/opencs/model/world/data.cpp +++ b/apps/opencs/model/world/data.cpp @@ -592,7 +592,8 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Stage::Messages& messages) } else { - /// \todo report deletion of non-existing record + messages.push_back (std::make_pair (UniversalId::Type_None, + "Trying to delete dialogue record " + id + " which does not exist")); } } else @@ -608,7 +609,9 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Stage::Messages& messages) { if (!mDialogue) { - /// \todo INFO record without matching DIAL record -> report to user + messages.push_back (std::make_pair (UniversalId::Type_None, + "Found info record not following a dialogue record")); + mReader->skipRecord(); break; } @@ -636,8 +639,9 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Stage::Messages& messages) default: - /// \todo throw an exception instead, once all records are implemented - /// or maybe report error and continue? + messages.push_back (std::make_pair (UniversalId::Type_None, + "Unsupported record type: " + n.toString())); + mReader->skipRecord(); }