Spreadsheet: Expose parse error to user.

This commit is contained in:
Eivind Kvedalen 2016-03-20 13:53:34 +01:00 committed by wmayer
parent c861505bc9
commit e230f3c5e7
2 changed files with 3 additions and 4 deletions

View File

@ -219,9 +219,8 @@ void Cell::setContent(const char * value)
expr = Spreadsheet::ExpressionParser::parse(owner->sheet(), value + 1);
}
catch (Base::Exception & e) {
QString msg = QString::fromUtf8("ERR: %1").arg(QString::fromUtf8(e.what()));
expr = new App::StringExpression(owner->sheet(), value);
setUsed(PARSE_EXCEPTION_SET);
setParseException(e.what());
}
}
else if (*value == '\'')

View File

@ -93,8 +93,6 @@ public:
void clearDirty();
void setParseException(const std::string & e);
void setResolveException(const std::string &e);
void clearResolveException();
@ -144,6 +142,8 @@ public:
private:
void setParseException(const std::string & e);
//void setExpression(const Expression * expr);
void setExpression(App::Expression *expr);