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

Side by Side Diff: runtime/lib/error.cc

Issue 8549033: Update comments in core lib showing proper factory syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « corelib/src/set.dart ('k') | runtime/lib/error.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "lib/error.h" 5 #include "lib/error.h"
6 6
7 #include "vm/bootstrap_natives.h" 7 #include "vm/bootstrap_natives.h"
8 #include "vm/exceptions.h" 8 #include "vm/exceptions.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 // Initialize field 'dstType'. 136 // Initialize field 'dstType'.
137 SetField(type_error, cls, "dstType", dst_type_name); 137 SetField(type_error, cls, "dstType", dst_type_name);
138 138
139 // Initialize field 'dstName'. 139 // Initialize field 'dstName'.
140 SetField(type_error, cls, "dstName", dst_name); 140 SetField(type_error, cls, "dstName", dst_name);
141 141
142 // Type errors in the core library may be difficult to diagnose. 142 // Type errors in the core library may be difficult to diagnose.
143 // Print type error information before throwing the error when debugging. 143 // Print type error information before throwing the error when debugging.
144 if (FLAG_print_stack_trace_at_throw) { 144 if (FLAG_print_stack_trace_at_throw) {
145 OS::Print("Type %s is not assignable to type %s of %s.\n", 145 intptr_t line, column;
146 script.GetTokenLocation(location, &line, &column);
147 OS::Print("'%s': Failed type check: line %d pos %d: "
148 "type '%s' is not assignable to type '%s' of '%s'.\n",
149 String::Handle(script.url()).ToCString(),
150 line, column,
146 src_type_name.ToCString(), 151 src_type_name.ToCString(),
147 dst_type_name.ToCString(), 152 dst_type_name.ToCString(),
148 dst_name.ToCString()); 153 dst_name.ToCString());
149 } 154 }
150 // Throw TypeError instance. 155 // Throw TypeError instance.
151 Exceptions::Throw(type_error); 156 Exceptions::Throw(type_error);
152 UNREACHABLE(); 157 UNREACHABLE();
153 } 158 }
154 159
155 160
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 dst_type_name = element_type.Name(); 301 dst_type_name = element_type.Name();
297 } 302 }
298 const String& dst_name = String::Handle(String::New(buf)); 303 const String& dst_name = String::Handle(String::New(buf));
299 ThrowTypeError(location, src_type_name, dst_type_name, dst_name); 304 ThrowTypeError(location, src_type_name, dst_type_name, dst_name);
300 UNREACHABLE(); 305 UNREACHABLE();
301 } 306 }
302 } 307 }
303 } 308 }
304 309
305 } // namespace dart 310 } // namespace dart
OLDNEW
« no previous file with comments | « corelib/src/set.dart ('k') | runtime/lib/error.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698