Index: pkg/fletchc/lib/src/please_report_crash.dart |
diff --git a/pkg/fletchc/lib/src/please_report_crash.dart b/pkg/fletchc/lib/src/please_report_crash.dart |
deleted file mode 100644 |
index 9b26e92626068091503bd693dc581edc7d26c2ac..0000000000000000000000000000000000000000 |
--- a/pkg/fletchc/lib/src/please_report_crash.dart |
+++ /dev/null |
@@ -1,73 +0,0 @@ |
-// Copyright (c) 2015, the Dartino 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.md file. |
- |
-library fletchc.please_report_crash; |
- |
-import 'guess_configuration.dart' show |
- fletchVersion; |
- |
-bool crashReportRequested = false; |
- |
-final String requestBugReportOnCompilerCrashMessage = """ |
-The Dartino compiler is broken. |
- |
-When compiling the above element, the compiler crashed. It is not |
-possible to tell if this is caused by a problem in your program or |
-not. Regardless, the compiler should not crash. |
- |
-The Dartino team would greatly appreciate if you would take a moment to |
-report this problem at https://github.com/dartino/sdk/issues/new |
- |
-Please include the following information: |
- |
-* the name and version of your operating system |
- |
-* the Dartino SDK version ($fletchVersion) |
- |
-* the entire message you see here (including the full stack trace |
- below as well as the source location above) |
-"""; |
- |
-final String requestBugReportOnOtherCrashMessage = """ |
-The Dartino program is broken and has crashed. |
- |
-The Dartino team would greatly appreciate if you would take a moment to |
-report this problem at https://github.com/dartino/sdk/issues/new |
- |
-Please include the following information: |
- |
-* the name and version of your operating system |
- |
-* the Dartino SDK version ($fletchVersion) |
- |
-* the entire message you see here (including the full stack trace below) |
-"""; |
- |
-void pleaseReportCrash(error, StackTrace trace) { |
- String formattedError = stringifyError(error, trace); |
- if (!crashReportRequested) { |
- crashReportRequested = true; |
- print("$requestBugReportOnOtherCrashMessage$formattedError"); |
- } else { |
- print(formattedError); |
- } |
-} |
- |
-String stringifyError(error, StackTrace stackTrace) { |
- String safeToString(object) { |
- try { |
- return '$object'; |
- } catch (e) { |
- return Error.safeToString(object); |
- } |
- } |
- StringBuffer buffer = new StringBuffer(); |
- buffer.writeln(safeToString(error)); |
- if (stackTrace != null) { |
- buffer.writeln(safeToString(stackTrace)); |
- } else { |
- buffer.writeln("No stack trace."); |
- } |
- return '$buffer'; |
-} |