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

Unified Diff: lib/runtime/errors.js

Issue 1182653002: Refactor runtime into libraries, better type reps (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Eliminate top level libraries from loader Created 5 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: lib/runtime/errors.js
diff --git a/lib/runtime/errors.js b/lib/runtime/errors.js
new file mode 100644
index 0000000000000000000000000000000000000000..26beceb45d6354b3882ffc4d697734e8c3253d36
--- /dev/null
+++ b/lib/runtime/errors.js
@@ -0,0 +1,31 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*
+ * This library encapsulates the core sdk errors that the runtime knows about.
+ *
+ */
+
+loader.library('dart/errors', null, /* Imports */[
+], /* Lazy Imports */[
+ 'dart/core',
+ 'dart/_js_helper'
+], function(exports, core, _js_helper) {
+ 'use strict';
+
+ function throwNoSuchMethod(obj, name, pArgs, nArgs, extras) {
+ throw new core.NoSuchMethodError(obj, name, pArgs, nArgs, extras);
+ }
+ exports.throwNoSuchMethod = throwNoSuchMethod;
+
+ function throwCastError(actual, type) {
+ throw new _js_helper.CastErrorImplementation(actual, type);
+ }
+ exports.throwCastError = throwCastError;
+
+ function throwAssertionError() {
+ throw new core.AssertionError();
+ }
+ exports.throwAssertionError = throwAssertionError;
+});

Powered by Google App Engine
This is Rietveld 408576698