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

@@ -18,6 +18,8 @@ namespace Graphing
virtual std::optional<std::vector<std::shared_ptr<IEquation>>> TryInitialize(const IExpression* graphingExp = nullptr) = 0;
virtual HRESULT GetInitializationError() = 0;
virtual IGraphingOptions& GetOptions() = 0;
virtual std::vector<std::shared_ptr<Graphing::IVariable>> GetVariables() = 0;

View File

@@ -64,9 +64,11 @@ namespace Graphing
virtual IEvalOptions& EvalOptions() = 0;
virtual IFormatOptions& FormatOptions() = 0;
virtual std::unique_ptr<IExpression> ParseInput(const std::wstring& input) = 0;
virtual std::shared_ptr<IGraph> CreateGrapher(const IExpression* expression) = 0;
virtual std::unique_ptr<IExpression> ParseInput(const std::wstring& input, int& errorCodeOut, int& errorTypeOut) = 0;
virtual void HRErrorToErrorInfo(HRESULT hr, int& errorCodeOut, int& errorTypeOut) = 0;
virtual std::shared_ptr<IGraph> CreateGrapher(const IExpression* expression) = 0;
virtual std::shared_ptr<Graphing::IGraph> CreateGrapher() = 0;
virtual std::wstring Serialize(const IExpression* expression) = 0;