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

Unified Diff: runtime/bin/error_exit.h

Issue 2681193002: Factor out snapshot helpers from main.cc. (Closed)
Patch Set: . Created 3 years, 10 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/bin/error_exit.h
diff --git a/runtime/bin/error_exit.h b/runtime/bin/error_exit.h
new file mode 100644
index 0000000000000000000000000000000000000000..fd2f833748a18980372ef96419afd8cdac47031f
--- /dev/null
+++ b/runtime/bin/error_exit.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2017, 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.
+
+#ifndef RUNTIME_BIN_ERROR_EXIT_H_
+#define RUNTIME_BIN_ERROR_EXIT_H_
+
+#include "bin/log.h"
zra 2017/02/10 15:42:34 Probably don't need all these includes here anymor
rmacnak 2017/02/13 19:17:03 Done.
+#include "bin/platform.h"
+#include "bin/process.h"
+#include "bin/eventhandler.h"
+#include "include/dart_api.h"
+#include "platform/assert.h"
+#include "platform/globals.h"
+
+namespace dart {
+namespace bin {
+
+// Exit code indicating an internal Dart Frontend error.
+static const int kDartFrontendErrorExitCode = 252;
+// Exit code indicating an API error.
+static const int kApiErrorExitCode = 253;
+// Exit code indicating a compilation error.
+static const int kCompilationErrorExitCode = 254;
+// Exit code indicating an unhandled error that is not a compilation error.
+static const int kErrorExitCode = 255;
+// Exit code indicating a vm restart request. Never returned to the user.
+static const int kRestartRequestExitCode = 1000;
+
+void ErrorExit(int exit_code, const char* format, ...);
+
+} // namespace bin
+} // namespace dart
+
+#endif // RUNTIME_BIN_ERROR_EXIT_H_
« no previous file with comments | « runtime/bin/bin.gypi ('k') | runtime/bin/error_exit.cc » ('j') | runtime/bin/error_exit.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698