| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Fletch 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library fletchc.driver.developer; | 5 library fletchc.driver.developer; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show |
| 8 Future, | 8 Future, |
| 9 Timer; | 9 Timer; |
| 10 | 10 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 } | 384 } |
| 385 | 385 |
| 386 Future printException() async { | 386 Future printException() async { |
| 387 String exception = await session.exceptionAsString(); | 387 String exception = await session.exceptionAsString(); |
| 388 print(exception); | 388 print(exception); |
| 389 } | 389 } |
| 390 | 390 |
| 391 Future printTrace() async { | 391 Future printTrace() async { |
| 392 String list = await session.list(); | 392 String list = await session.list(); |
| 393 String stackTrace = session.debugState.formatStackTrace(); | 393 String stackTrace = session.debugState.formatStackTrace(); |
| 394 if (!stackTrace.isEmpty) (stackTrace); | 394 if (!stackTrace.isEmpty) print(stackTrace); |
| 395 if (!stackTrace.isEmpty) print(list); | 395 if (!stackTrace.isEmpty) print(list); |
| 396 } | 396 } |
| 397 | 397 |
| 398 try { | 398 try { |
| 399 switch (command.code) { | 399 switch (command.code) { |
| 400 case CommandCode.UncaughtException: | 400 case CommandCode.UncaughtException: |
| 401 state.log("Uncaught error"); | 401 state.log("Uncaught error"); |
| 402 exitCode = exit_codes.DART_VM_EXITCODE_UNCAUGHT_EXCEPTION; | 402 exitCode = exit_codes.DART_VM_EXITCODE_UNCAUGHT_EXCEPTION; |
| 403 await printException(); | 403 await printException(); |
| 404 await printTrace(); | 404 await printTrace(); |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 "packages": packages == null ? null : "$packages", | 891 "packages": packages == null ? null : "$packages", |
| 892 "options": options, | 892 "options": options, |
| 893 "constants": constants, | 893 "constants": constants, |
| 894 "device_address": deviceAddress, | 894 "device_address": deviceAddress, |
| 895 "device_type": (deviceType == null) | 895 "device_type": (deviceType == null) |
| 896 ? null | 896 ? null |
| 897 : unParseDeviceType(deviceType), | 897 : unParseDeviceType(deviceType), |
| 898 }; | 898 }; |
| 899 } | 899 } |
| 900 } | 900 } |
| OLD | NEW |