Chromium Code Reviews| Index: ppapi/native_client/src/trusted/plugin/plugin_error.h |
| =================================================================== |
| --- ppapi/native_client/src/trusted/plugin/plugin_error.h (revision 211556) |
| +++ ppapi/native_client/src/trusted/plugin/plugin_error.h (working copy) |
| @@ -115,23 +115,42 @@ |
| void SetReport(PluginErrorCode error_code, const std::string& message) { |
| error_code_ = error_code; |
| message_ = message; |
| + console_message_ = message; |
| } |
| + // console_message is a part of error that is logged to JavaScript console |
|
Mark Seaborn
2013/07/19 15:25:30
Nit: "the error"; "the JavaScript console"
halyavin
2013/07/22 09:11:35
Done.
|
| + // but is not reported to JavaScript via lastError property. This is used |
|
Mark Seaborn
2013/07/19 15:25:30
"the lastError property"
halyavin
2013/07/22 09:11:35
Done.
|
| + // to report internal errors which may easily change in new versions of |
|
Mark Seaborn
2013/07/19 15:25:30
This doesn't really explain that we're hiding the
halyavin
2013/07/22 09:11:35
Done.
|
| + // the browser. |
| + void SetReportWithConsoleOnlyError(PluginErrorCode error_code, |
| + const std::string& message, |
| + const std::string& console_message) { |
| + error_code_ = error_code; |
| + message_ = message; |
| + console_message_ = message + "; " + console_message; |
| + } |
| + |
| PluginErrorCode error_code() const { |
| return error_code_; |
| } |
| void PrependMessage(const std::string& prefix) { |
| message_ = prefix + message_; |
| + console_message_ = prefix + console_message_; |
| } |
| const std::string& message() const { |
| return message_; |
| } |
| + const std::string& console_message() const { |
| + return console_message_; |
| + } |
| + |
| private: |
| PluginErrorCode error_code_; |
| std::string message_; |
| + std::string console_message_; |
| NACL_DISALLOW_COPY_AND_ASSIGN(ErrorInfo); |
| }; |