Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Unified Diff: Source/core/dom/ExceptionBase.cpp

Issue 16818023: DOMException toString is not correct (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/ExceptionBase.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ExceptionBase.cpp
diff --git a/Source/core/dom/ExceptionBase.cpp b/Source/core/dom/ExceptionBase.cpp
index fcfd7efcc0be0d8e5eedfc68f791653bce5d9be5..9276fd744d4e0ea941d19cebad1be8defa11f03d 100644
--- a/Source/core/dom/ExceptionBase.cpp
+++ b/Source/core/dom/ExceptionBase.cpp
@@ -36,18 +36,17 @@ namespace WebCore {
ExceptionBase::ExceptionBase(const ExceptionCodeDescription& description)
: m_code(description.code)
- , m_name(description.name)
, m_description(description.description)
{
if (description.name)
- m_message = m_name + ": " + description.typeName + " Exception " + String::number(description.code);
+ m_name = description.name;
else
- m_message = String(description.typeName) + " Exception " + String::number(description.code);
+ m_name = description.typeName;
}
String ExceptionBase::toString() const
{
- return "Error: " + m_message;
+ return m_name + ": " + message();
}
} // namespace WebCore
« no previous file with comments | « Source/core/dom/ExceptionBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698