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

Unified Diff: runtime/vm/object.h

Issue 340203003: Cleanup of error and warning reporting. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 37456)
+++ runtime/vm/object.h (working copy)
@@ -17,6 +17,7 @@
#include "vm/isolate.h"
#include "vm/os.h"
#include "vm/raw_object.h"
+#include "vm/report.h"
#include "vm/scanner.h"
#include "vm/tags.h"
@@ -4060,16 +4061,10 @@
class LanguageError : public Error {
public:
- enum Kind {
- kWarning,
- kError,
- kMalformedType,
- kMalboundedType,
- kBailout,
- };
+ Report::Kind kind() const {
+ return static_cast<Report::Kind>(raw_ptr()->kind_);
+ }
- Kind kind() const { return static_cast<Kind>(raw_ptr()->kind_); }
-
// Build, cache, and return formatted message.
RawString* FormatMessage() const;
@@ -4081,7 +4076,7 @@
static RawLanguageError* NewFormatted(const Error& prev_error,
const Script& script,
intptr_t token_pos,
- Kind kind,
+ Report::Kind kind,
Heap::Space space,
const char* format, ...)
PRINTF_ATTRIBUTE(6, 7);
@@ -4089,12 +4084,12 @@
static RawLanguageError* NewFormattedV(const Error& prev_error,
const Script& script,
intptr_t token_pos,
- Kind kind,
+ Report::Kind kind,
Heap::Space space,
const char* format, va_list args);
static RawLanguageError* New(const String& formatted_message,
- Kind kind = kError,
+ Report::Kind kind = Report::kError,
Heap::Space space = Heap::kNew);
virtual const char* ToErrorCString() const;

Powered by Google App Engine
This is Rietveld 408576698