|
|
Deal with unhandled exceptions the same way in all Dart api functions.
--
Terminology change: invalid handles are now called error handles.
Unhandled exceptions used to be a kind of valid handle. Now they are
a kind of error handle.
For the Dart_Invoke* functions, this means that the standard
error-checking blob drops from two tests to one test and is
harder to mess up.
Many other Dart api functions (Dart_ToString, for example) previously
dealt with unhandled exceptions by turning them into terse error
messages. Now these functions preserve information about the
exceptions and generate better error messages.
Changed Dart_HandleMessage to return success/failure. It seemed to fit.
--
Details:
Dart_IsValid becomes Dart_IsError (negated sense).
Dart_GetError now knows how to print a stack trace semi-nicely.
Dart_ExceptionOccurred -> Dart_IsUnhandledException.
Renamed ApiFailure class to ApiError to fit better.
ApiError now has a "data" pointer that points to either an error
message string or to an unhandled exception object.
Documentation changes aplenty.
Total comments: 20
Total comments: 13
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+579 lines, -464 lines) |
Patch |
 |
M |
runtime/bin/builtin.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
runtime/bin/builtin_in.cc
|
View
|
1
2
3
4
|
5 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
 |
M |
runtime/bin/dartutils.cc
|
View
|
1
2
3
4
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
runtime/bin/eventhandler.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
runtime/bin/file.cc
|
View
|
1
2
3
4
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
runtime/bin/gen_snapshot.cc
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
runtime/bin/main.cc
|
View
|
1
2
3
4
|
8 chunks |
+14 lines, -41 lines |
0 comments
|
Download
|
 |
M |
runtime/bin/process.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
runtime/bin/process_script.cc
|
View
|
1
2
3
4
|
6 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
runtime/bin/socket.cc
|
View
|
1
2
3
4
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
runtime/include/dart_api.h
|
View
|
1
2
3
4
|
26 chunks |
+143 lines, -106 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/dart_api_impl.h
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/dart_api_impl.cc
|
View
|
1
2
3
4
|
24 chunks |
+164 lines, -107 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/dart_api_impl_test.cc
|
View
|
1
2
3
4
|
46 chunks |
+133 lines, -100 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/exceptions_test.cc
|
View
|
1
2
3
4
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/isolate.cc
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
runtime/vm/isolate_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/object.h
|
View
|
1
2
3
4
|
4 chunks |
+15 lines, -12 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/object.cc
|
View
|
1
2
3
4
|
6 chunks |
+32 lines, -16 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/parser.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
runtime/vm/raw_object.h
|
View
|
1
2
3
4
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/raw_object.cc
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/raw_object_snapshot.cc
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/snapshot_test.cc
|
View
|
1
2
3
4
|
3 chunks |
+4 lines, -15 lines |
0 comments
|
Download
|
 |
M |
runtime/vm/unit_test.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
runtime/vm/unit_test.cc
|
View
|
1
2
3
4
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
Total messages: 7 (0 generated)
|