dart-sdk/runtime/observatory
turnidge@google.com 2757d6e686 Rework error handling in the service protocol and in Observatory.
In JSON RPC, error results and regular results are distinguished structurally.  We now do this in the service protocol instead of returning a regular result with the "Error" type.

VM:

- Add PrintError method to JSONStream.  Use this to generate all errors in the service protocol.

- Fix some bugs with "limit" parameter handling.

- Change return value for heap rpcs when they find a collected/expired reference.

- Update tests.

Observatory:

- Add app.handleExceptions -- this is a widely-used exception handler that puts up a notification when there is an uncaught/unexpected exception.  Added a top-level zone catch that uses this handler, as well as explicit uses of this handler at various points in the code.  Most pages use this implicitly or explictly, except for the debugger page, which displays exceptions in the console.

[ General rule, when a function returns a Future, generally let the error pass through.  If a function does async work but doesn't return the Future, then it should handle errors explicitly by calling app.handleExceptions, etc. ]

- Fixed notifications.  They were generally broken.  Some hard-coded type names needed to be fixed, some hacks needed to be removed.

- Add a new class RpcException and a variety of subclasses which capture the error cases when making an rpc.

- Redo refresh buttons so their callbacks return Futures instead of taking a "done" closure.  Cleaner.  Allows us to move error handling outside of the callback.

- Drop ServiceError, ServiceException and the associated views.

- Redo notifications so that event and exception notifications are supported.

- No longer null out the vm when it is disconnected.

- Remove notifications when we visit the vm-connect page.  Only show the "Proceeding will lose current page" dialog when we aren't on the vm-connect page already.

- Improve error message on cpu profile page when profiling is disabled on the VM.

- Allow variables to wrap on debugger page.

- Make eval-box and eval-link tolerant of errors during rpc.  Make the errors display nicely.

- When a breakpoint is marked "not possible", make sure it disappears.  This got broken during script view refactor.

- Drop vm's errors and exceptions streams.  No longer needed.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1120133002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45792 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 19:34:37 +00:00
..
bin Fix dart warnings. 2015-02-05 18:21:23 +00:00
lib Rework error handling in the service protocol and in Observatory. 2015-05-14 19:34:37 +00:00
maintainers Fix breakage due to package upgrades 2015-05-06 14:53:12 +00:00
tests Rework error handling in the service protocol and in Observatory. 2015-05-14 19:34:37 +00:00
web Fix breakage due to package upgrades 2015-05-06 14:53:12 +00:00
.gitignore Rev observatory dependencies 2015-02-18 16:00:15 +00:00
observatory.gypi Fix Observatory rebuild 2015-05-07 12:45:33 +00:00
observatory_sources.gypi Rework error handling in the service protocol and in Observatory. 2015-05-14 19:34:37 +00:00
pubspec.yaml Fix breakage due to package upgrades 2015-05-06 14:53:12 +00:00
README_android Build Observatory as part of runtime 2015-01-06 21:59:42 +00:00
run.sh Build Observatory as part of runtime 2015-01-06 21:59:42 +00:00