Skip to content

Commit

Permalink
Spreadsheet: Expose parse error to user.
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindkv authored and wwmayer committed Apr 2, 2016
1 parent c861505 commit e230f3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Mod/Spreadsheet/App/Cell.cpp
Expand Up @@ -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 == '\'')
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Spreadsheet/App/Cell.h
Expand Up @@ -93,8 +93,6 @@ class SpreadsheetExport Cell {

void clearDirty();

void setParseException(const std::string & e);

void setResolveException(const std::string &e);

void clearResolveException();
Expand Down Expand Up @@ -144,6 +142,8 @@ class SpreadsheetExport Cell {

private:

void setParseException(const std::string & e);

//void setExpression(const Expression * expr);

void setExpression(App::Expression *expr);
Expand Down

0 comments on commit e230f3c

Please sign in to comment.