Improve error handling by displaying an error message (#1075)

* wire up error messages

* more errors

* fix crash on render error

* Always show copy and cut

* PR comments

* Fix spelling
This commit is contained in:
Pepe Rivera
2020-03-25 15:18:34 -07:00
committed by GitHub
parent 7b51b45906
commit fc19ddcbcb
15 changed files with 582 additions and 32 deletions

View File

@@ -29,6 +29,11 @@ namespace MockGraphingImpl
return std::nullopt;
}
HRESULT GetInitializationError()
{
return S_OK;
}
virtual Graphing::IGraphingOptions& GetOptions()
{
return m_graphingOptions;

View File

@@ -115,7 +115,7 @@ namespace MockGraphingImpl
return m_formatOptions;
}
std::unique_ptr<Graphing::IExpression> ParseInput(const std::wstring& input) override
std::unique_ptr<Graphing::IExpression> ParseInput(const std::wstring& input, int& errorCodeOut, int& errorTypeOut) override
{
if (input.empty())
{
@@ -125,6 +125,10 @@ namespace MockGraphingImpl
return std::make_unique<MockExpression>(MockExpression{});
}
void HRErrorToErrorInfo(HRESULT hr, int& errorCodeOut, int& errorTypeOut)
{
}
std::shared_ptr<Graphing::IGraph> CreateGrapher(const Graphing::IExpression* expression) override;
std::shared_ptr<Graphing::IGraph> CreateGrapher() override;