diff --git a/libraries/lib-sentry-reporting/AnonymizedMessage.h b/libraries/lib-sentry-reporting/AnonymizedMessage.h index b9a5ccab5..bc83b9468 100644 --- a/libraries/lib-sentry-reporting/AnonymizedMessage.h +++ b/libraries/lib-sentry-reporting/AnonymizedMessage.h @@ -17,10 +17,15 @@ namespace audacity { namespace sentry { - +//! A class, that stores anonymized message. +/*! + Input message is anonymized by looking for path-like patterns. + Messages are stored in UTF8 format. +*/ class SENTRY_REPORTING_API AnonymizedMessage final { public: + //! Creates an empty message AnonymizedMessage() = default; AnonymizedMessage(const AnonymizedMessage&) = default; @@ -29,21 +34,31 @@ public: AnonymizedMessage& operator=(const AnonymizedMessage&) = default; AnonymizedMessage& operator=(AnonymizedMessage&&) = default; + //! Creates a message from std::string AnonymizedMessage(std::string message); + //! Creates a message from std::wstring AnonymizedMessage(const std::wstring& message); + //! Creates a message from wxString AnonymizedMessage(const wxString& message); - + //! Creates a message from const char* AnonymizedMessage(const char* message); + //! Creates a message from const wchar_t* AnonymizedMessage(const wchar_t* message); + //! Checks, if the message is empty bool Empty() const noexcept; + //! Returns the length of the message size_t Length() const noexcept; + //! Returns the UTF8 representation of the message const std::string& GetString() const noexcept; + //! Convert the message to wxString wxString ToWXString() const noexcept; - // Immitate std::string interface + // Imitate std::string interface + //! Checks, if the message is empty const char* c_str() const noexcept; + //! Returns the length of the message size_t length() const noexcept; private: void CleanupPaths(); diff --git a/src/FileException.h b/src/FileException.h index fe5cd2312..bc5ad8aec 100644 --- a/src/FileException.h +++ b/src/FileException.h @@ -35,7 +35,7 @@ public: // DV: We consider a FileException to be internal for now. // We used to have some odd cases related to the read-only folder in 3.0.0, // so it is good to have a full picture here. - // In case we see to many - we will tweak this behavior in the next release. + // In case we see too many - we will tweak this behavior in the next release. : MessageBoxException{ ExceptionType::Internal, caption } , cause{ cause_ }, fileName{ fileName_ }, renameTarget{ renameTarget_ } {}