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

Unified Diff: runtime/vm/exceptions.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
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/exceptions.h
===================================================================
--- runtime/vm/exceptions.h (revision 37467)
+++ runtime/vm/exceptions.h (working copy)
@@ -6,20 +6,21 @@
#define VM_EXCEPTIONS_H_
#include "vm/allocation.h"
-#include "vm/growable_array.h"
namespace dart {
// Forward declarations.
+class Array;
class Class;
class DartFrameIterator;
class Error;
class Instance;
class Object;
class RawInstance;
+class RawObject;
class RawScript;
class RawStacktrace;
-class RawObject;
+class RawString;
class Script;
class StackFrame;
class String;
@@ -34,22 +35,8 @@
const Instance& stacktrace);
static void PropagateError(const Error& error);
- // Report a Javascript compatibility warning at the call site given by
- // caller_frame. Note that a JavascriptCompatibilityError is thrown
- // if --warning_as_error is specified.
- // Also calls TraceJSWarningV below.
- static void JSWarning(StackFrame* caller_frame, const char* format, ...)
- PRINTF_ATTRIBUTE(2, 3);
-
- // Emit a Javascript compatibility warning to the current trace buffer.
- static void TraceJSWarningF(const Script& script, intptr_t token_pos,
- const char* format, ...) PRINTF_ATTRIBUTE(3, 4);
- static void TraceJSWarningV(const Script& script, intptr_t token_pos,
- const char* format, va_list args);
-
- static RawStacktrace* CurrentStacktrace();
-
// Helpers to create and throw errors.
+ static RawStacktrace* CurrentStacktrace();
static RawScript* GetCallerScript(DartFrameIterator* iterator);
static RawInstance* NewInstance(const char* class_name);
static void CreateAndThrowTypeError(intptr_t location,
@@ -85,6 +72,7 @@
static void ThrowOOM();
static void ThrowStackOverflow();
static void ThrowArgumentError(const Instance& arg);
+ static void ThrowJavascriptCompatibilityError(const char* msg);
// Returns a RawInstance if the exception is successfully created,
// otherwise returns a RawError.
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698