Spreadsheet: Expose parse error to user.
This commit is contained in:
parent
c861505bc9
commit
e230f3c5e7
|
@ -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 == '\'')
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user