From 69c3e7111f93290d1278d6116e9fd50079b4fe79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 11 May 2014 12:37:21 +0200 Subject: Make 1.6+ work with new instance format. --- logic/minecraft/ParseUtils.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'logic/minecraft/ParseUtils.cpp') diff --git a/logic/minecraft/ParseUtils.cpp b/logic/minecraft/ParseUtils.cpp index 67460ca4..f94de6ff 100644 --- a/logic/minecraft/ParseUtils.cpp +++ b/logic/minecraft/ParseUtils.cpp @@ -8,16 +8,17 @@ QDateTime timeFromS3Time(QString str) return QDateTime::fromString(str, Qt::ISODate); } -void parse_timestamp (const QString & raw, QString & save_here, QDateTime & parse_here) +bool parse_timestamp (const QString & raw, QString & save_here, QDateTime & parse_here) { save_here = raw; if (save_here.isEmpty()) { - throw JSONValidationError("The timestamp is empty!"); + return false; } parse_here = timeFromS3Time(save_here); if (!parse_here.isValid()) { - throw JSONValidationError("The timestamp not a valid timestamp!"); + return false; } + return true; } -- cgit v1.2.3