| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/exceptions.h" | 5 #include "vm/exceptions.h" |
| 6 | 6 |
| 7 #include "platform/address_sanitizer.h" | 7 #include "platform/address_sanitizer.h" |
| 8 | 8 |
| 9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| 11 #include "vm/debugger.h" | 11 #include "vm/debugger.h" |
| 12 #include "vm/flags.h" | 12 #include "vm/flags.h" |
| 13 #include "vm/object.h" | 13 #include "vm/object.h" |
| 14 #include "vm/object_store.h" | 14 #include "vm/object_store.h" |
| 15 #include "vm/stack_frame.h" | 15 #include "vm/stack_frame.h" |
| 16 #include "vm/stub_code.h" | 16 #include "vm/stub_code.h" |
| 17 #include "vm/symbols.h" | 17 #include "vm/symbols.h" |
| 18 #include "vm/tags.h" | 18 #include "vm/tags.h" |
| 19 | 19 |
| 20 namespace dart { | 20 namespace dart { |
| 21 | 21 |
| 22 DEFINE_FLAG(bool, print_stacktrace_at_throw, false, | 22 DEFINE_FLAG(bool, print_stacktrace_at_throw, false, |
| 23 "Prints a stack trace everytime a throw occurs."); | 23 "Prints a stack trace everytime a throw occurs."); |
| 24 DEFINE_FLAG(bool, verbose_stacktrace, false, | |
| 25 "Stack traces will include methods marked invisible."); | |
| 26 | 24 |
| 27 | 25 |
| 28 const char* Exceptions::kCastErrorDstName = "type cast"; | 26 const char* Exceptions::kCastErrorDstName = "type cast"; |
| 29 | 27 |
| 30 | 28 |
| 31 class StacktraceBuilder : public ValueObject { | 29 class StacktraceBuilder : public ValueObject { |
| 32 public: | 30 public: |
| 33 StacktraceBuilder() { } | 31 StacktraceBuilder() { } |
| 34 virtual ~StacktraceBuilder() { } | 32 virtual ~StacktraceBuilder() { } |
| 35 | 33 |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 | 754 |
| 757 // Throw JavascriptCompatibilityError exception. | 755 // Throw JavascriptCompatibilityError exception. |
| 758 void Exceptions::ThrowJavascriptCompatibilityError(const char* msg) { | 756 void Exceptions::ThrowJavascriptCompatibilityError(const char* msg) { |
| 759 const Array& exc_args = Array::Handle(Array::New(1)); | 757 const Array& exc_args = Array::Handle(Array::New(1)); |
| 760 const String& msg_str = String::Handle(String::New(msg)); | 758 const String& msg_str = String::Handle(String::New(msg)); |
| 761 exc_args.SetAt(0, msg_str); | 759 exc_args.SetAt(0, msg_str); |
| 762 Exceptions::ThrowByType(Exceptions::kJavascriptCompatibilityError, exc_args); | 760 Exceptions::ThrowByType(Exceptions::kJavascriptCompatibilityError, exc_args); |
| 763 } | 761 } |
| 764 | 762 |
| 765 } // namespace dart | 763 } // namespace dart |
| OLD | NEW |